You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Error sending message
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: {. Path 'error', line 2, position 12.
at Newtonsoft.Json.JsonTextReader.ReadStringValue(ReadType readType)
at Newtonsoft.Json.JsonTextReader.ReadAsString()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
at ZendeskApi.Client.Extensions.HttpContentExtensions.ReadAs[T](Stream stream)
at ZendeskApi.Client.Extensions.HttpContentExtensions.ReadAsAsync[T](HttpContent content)
at ZendeskApi.Client.Exceptions.ZendeskRequestExceptionBuilder.Build()
at ZendeskApi.Client.Extensions.HttpResponseExtensions.ThrowZendeskRequestException(HttpResponseMessage response, String helpDocLink, HttpStatusCode[] expected, String helpDocLinkPrefix)
at ZendeskApi.Client.Extensions.HttpResponseExtensions.ThrowZendeskRequestException(HttpResponseMessage response, String helpDocLink, Nullable`1 expected, String helpDocLinkPrefix)
at ZendeskApi.Client.Extensions.HttpResponseExtensions.ThrowIfUnsuccessful(Task`1 response, String helpDocLink, Nullable`1 expected, String helpDocLinkPrefix)
at ZendeskApi.Client.Resources.AbstractBaseResource`1.CreateAsync[TRequest](String resource, TRequest item, String docs, HttpStatusCode expectedStatusCode, String scope, CancellationToken cancellationToken)
at ZendeskApi.Client.Extensions.HttpResponseExtensions.ReadContentAsAsync[T](Task`1 response, JsonConverter converter)
at ZendeskApi.Client.Resources.AbstractBaseResource`1.CreateAsync[TResponse,TRequest](String resource, TRequest item, String docs, HttpStatusCode expectedStatusCode, String scope, CancellationToken cancellationToken)
at ZendeskApi.Client.Resources.TicketsResource.CreateAsync(TicketCreateRequest ticket, CancellationToken cancellationToken)
The text was updated successfully, but these errors were encountered:
@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." } }
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: