-
Notifications
You must be signed in to change notification settings - Fork 86
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
JsonReaderException in ThrowZendeskRequestException #330
Comments
Hi @follesoe, what are the steps to reproduce? what are the ticket arguments you passed in when trying to create? |
@fbvilela I believe it was due to an incorrect auth token. So I would try it out by setting an invalid token and see how the ZendeskRequestExceptionBuilder behaves. |
The JSON body I am receiving when this error occurs is: { "error": { "title": "Forbidden", "message": "You do not have access to this page. Please contact the account owner of this help desk for further help." } } |
MatthewBAllen
added a commit
to MatthewBAllen/ZendeskApiClient
that referenced
this issue
Aug 30, 2024
…or with object body We received two different error message formats. one: { "error": "Couldn't authenticate you" } two: { "error": { "title": "Forbidden", "message": "You do not have access to this page. Please contact the account owner of this help desk for further help." } } The current ErrorResponse model class was able to handle the first response but would throw this error with the second response: "Unexpected character encountered while parsing value: {. Path 'error', line 2, position 12" because it's expecting a string value for error but instead it hits a complex object . The new ErrorWithMessageResponse model class will allow the user to deserialize the second response and convert it to an ErrorResponse object.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like there is an error in the code converting an error response from Zendesk into an exception.
It throws a
JsonReaderException
with the following message:Unexpected character encountered while parsing value: {. Path 'error', line 2, position 12.
.I have not been able to capture the raw JSON to give an example of the error payload from Zendesk.
The text was updated successfully, but these errors were encountered: