Skip to content

[bug] Fix NullPointerException when error stream does not contain error json field - #69

Open
damienbeaufils wants to merge 3 commits into
prismicio-community:masterfrom
damienbeaufils:fix-npe-error-json
Open

[bug] Fix NullPointerException when error stream does not contain error json field#69
damienbeaufils wants to merge 3 commits into
prismicio-community:masterfrom
damienbeaufils:fix-npe-error-json

Conversation

@damienbeaufils

Copy link
Copy Markdown

Hello Prismic team,

We've noticed a NullPointerException error which can occur when Prismic API returns an error with a body which does not contain the error json field.
The corresponding stracktrace:

java.lang.NullPointerException: null
    at io.prismic.core.HttpClient.fetch(HttpClient.java:62)
    at io.prismic.Form$SearchForm.submit(Form.java:411)

This PR handle this NPE and fix a test which fails since March 12th because of the default CDN activation.

Thanks!

@arnaudlewis

Copy link
Copy Markdown
Contributor

Thanks for your contribution @damienbeaufils.
We need to identify the source before merging, I'll keep you posted.

@bobsoppe

Copy link
Copy Markdown

@arnaudlewis any update on this PR?

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

Successfully merging this pull request may close these issues.

4 participants