Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
u9g opened this issue Jul 7, 2023 · 1 comment
Labels
A-schema Area: the data model that queries use C-enhancement Category: raise the bar on expectations E-easy Call for participation: experience needed to fix: easy / not much (good first issue) E-help-wanted Call for participation: help is requested to fix this issue. E-mentor Call for participation: mentorship is available for this issue.

Comments

@u9g
Copy link
Contributor

u9g commented Jul 7, 2023

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
@obi1kenobi
Copy link
Owner

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 obi1kenobi changed the title Unclear error message that enters unreachable code Unclear error message when parsing a schema containing a field with undeclared type Jul 7, 2023
@obi1kenobi obi1kenobi added A-schema Area: the data model that queries use C-enhancement Category: raise the bar on expectations E-help-wanted Call for participation: help is requested to fix this issue. E-mentor Call for participation: mentorship is available for this issue. E-easy Call for participation: experience needed to fix: easy / not much (good first issue) labels Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-schema Area: the data model that queries use C-enhancement Category: raise the bar on expectations E-easy Call for participation: experience needed to fix: easy / not much (good first issue) E-help-wanted Call for participation: help is requested to fix this issue. E-mentor Call for participation: mentorship is available for this issue.
Projects
None yet
Development

No branches or pull requests

2 participants