trustfall icon indicating copy to clipboard operation
trustfall copied to clipboard

Unclear error message when parsing a schema containing a field with undeclared type

Open u9g opened this issue 1 year ago • 1 comments

thread 'main' panicked at 'internal error: entered unreachable code: field value_as_url (type Url) appears to represent neither an edge nor a property', C:\Users\_\.cargo\registry\src\index.crates.io-6f17d22bba15001f\trustfall_core-0.5.0\src\schema\mod.rs:399:17

u9g avatar Jul 07 '23 17:07 u9g

The unreachable code bit is probably an .unwrap() or similar in your code. The schema parser returns Result::Err on that line.

But the error message should instead say something like field value_as_url is declared with non-existent type Url and perhaps even did you mean URL?

obi1kenobi avatar Jul 07 '23 18:07 obi1kenobi