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

Improve error logging of JSON insert api failure - "unsupported value type" #1062

Closed
bZichett opened this issue Mar 3, 2023 · 3 comments
Closed

Comments

@bZichett
Copy link

bZichett commented Mar 3, 2023

Is your feature request related to a problem? Please describe.
Moreso a very easy improvement to aid in awareness of what the particular violation is

Describe the solution you'd like
Include the field name that failed validation and the value that caused the failure. For bulk json updates, it'd be great to include at the ID of the document that caused failure. These three additions would be completely sufficient.

sError = "unsupported value type";

Above is where the following error message is produced.

HTTP response headers: HTTPHeaderDict({'Server': '6.0.2 [...])', 'Content-Type': 'application/json; charset=UTF-8', 'Content-Length': '34'})  
HTTP response body: {"error":"unsupported value type"}  

The aspecificity is pretty unhelpful since I am using the bulk update to API to index thousands of documents at once (nearly positive the issue I am having is with an unexpected nulll field.) And there is a bit of friction for me to narrow down the problem here.

@sanikolaev
Copy link
Collaborator

Thanks. We'll think what we can do with it.

@sanikolaev
Copy link
Collaborator

It's unlikely we'll be able to refer to the document ID, but what we can improve is to at least point to a specific line in the bulk input.

@klirichek
Copy link
Contributor

Fixed in 87a0f3b
See commit message for details

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

4 participants