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

Error message with dot access can be very confusing. #166

Open
evinism opened this issue Jun 17, 2022 · 0 comments
Open

Error message with dot access can be very confusing. #166

evinism opened this issue Jun 17, 2022 · 0 comments

Comments

@evinism
Copy link
Owner

evinism commented Jun 17, 2022

If you index a string using dot access, you get a very confusing error message stating that we expected a number, but got a string. This does not lead to a good debugging experience. Comes from this SO post. This is also likely an issue with all invalid dot accesses in MistQL.

Example

Data: "{\"foo\": \"bar\"}"

Query: @.foo

Expected: Error stating that dot access on strings is not allowed.

Actual: MistQLTypeError: Expected RuntimeValueType.Number, got RuntimeValueType.String

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant