-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Oracle's response is not a JSON, and I'm not able to see its content.
There should be a better way to handle this case.
Error: Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
at Oci.Common.Http.Internal.ResponseHelper.HandleNonSuccessfulResponse(HttpResponseMessage responseMessage, ApiDetails apiDetails, String caller)
at Oci.Common.Retry.GenericRetrier.ShoulRetryOnHttpResponse(HttpResponseMessage response)
at Oci.Common.Retry.GenericRetrier.<>c__DisplayClass4_0.<MakeRetryingCall>b__1(HttpResponseMessage r)
at Polly.PolicyBuilder`1.<>c__DisplayClass14_0.<OrResult>b__0(TResult result)
at Polly.ResultPredicates`1.<>c__DisplayClass2_0.<AnyMatch>b__0(ResultPredicate`1 predicate)
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
at Polly.ResultPredicates`1.AnyMatch(TResult result)
at Polly.Retry.AsyncRetryEngine.<ImplementationAsync>d__0`1.MoveNext()
oci-dotnet-sdk/Common/Src/Http/Internal/ResponseHelper.cs
Lines 113 to 120 in a444201
| return JsonConvert.DeserializeObject<T>(content, jsonSerializerSettings); | |
| } | |
| catch (Exception e) | |
| { | |
| logger.Warn($"Failed to parse response body: \n{e.StackTrace}"); | |
| // Throw the exception instead of wrapping it with OciException. | |
| // This is to differentiate errors coming from service side and errors from SDK serialization/deserialization. | |
| throw e; |
Metadata
Metadata
Assignees
Labels
No labels