oci-dotnet-sdk
oci-dotnet-sdk copied to clipboard
JsonReaderException: not being able to see the response
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()
https://github.com/oracle/oci-dotnet-sdk/blob/a4442019154a208f8c5b7092f52be5502eda9b3b/Common/Src/Http/Internal/ResponseHelper.cs#L113-L120
Possibly related: #298
@NiviPari - Can you take a look ?