-
Notifications
You must be signed in to change notification settings - Fork 38
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
NullpointerException when REST call returns error #51
Comments
Very weird! The |
I think this is related to the new multi-language feature. I guess this happens when we query a document which doesn't exist in the language given. |
Ok, I'm going to investigate! Thanks for your report! |
I'm getting an NPE in the HttpClient as well:
This appears to be because the HttpClient expects an error response to have an "error" key (see below).
When inspecting the actual response, it does not have an "error" key:
So the client is expecting an error response to have the "error" key (thus not checking for null), which leads to a NPE. Did the api change to put the error in the "message" key? |
Hi Team! Can you please respond to this issue? It's rather ugly to have to catch NullPointerException when using your (java) api. |
Hi Team!
We experience NullPointerExceptions int the api when some queries fail:
java.lang.NullPointerException at io.prismic.core.HttpClient.fetch(HttpClient.java:59) at io.prismic.Form$SearchForm.submit(Form.java:412)
The response that cannot be processed looks like this:
{"message":"Release not provided"}
The text was updated successfully, but these errors were encountered: