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

Query/JSON: throw better exception when expecting array of objects, but the JSON represents a single object #33576

Open
maumar opened this issue Apr 19, 2024 · 1 comment

Comments

@maumar
Copy link
Contributor

maumar commented Apr 19, 2024

pointed out by @aldrashan here: #33101 (comment)

Basically when the mismatch happens we throw Invalid token type: 'StartObject'. We should throw a better exception.

@roji
Copy link
Member

roji commented Apr 19, 2024

@maumar we could consider this, but note that there's a big variety of cases where the JSON in the database doesn't correspond to what the user tells us, and I doubt that the regular JSON deserializer (in System.Text.Json) does a significantly better job here (it may be worth checking).

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

2 participants