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 when accessing index 0 is confusing #1257

Open
necessarily-equal opened this issue Aug 18, 2024 · 2 comments
Open

Error when accessing index 0 is confusing #1257

necessarily-equal opened this issue Aug 18, 2024 · 2 comments

Comments

@necessarily-equal
Copy link

In cases where one tries to access the index of a sequence, no nice error message is printed but the frontend “panics” and prints a generic error message instead:

image

It could print a nice error message such as “tried to access index 0 of a sequence, in JSONiq indexes start at 1.”
This may affect arrays also, I didn't test that case.

@ghislainfourny
Copy link
Member

Thanks @necessarily-equal for this feedback. You are correct that this should not fail with such an error. We will address this.

@mschoeb
Copy link
Collaborator

mschoeb commented Nov 1, 2024

Thanks for the report, turns out it was not just a bad error message but also a bug underneath. The fix for it is now commited in our non-public repo and will be merged sometime in the future

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

No branches or pull requests

3 participants