Browse Source

ThrowExceptionForResponseAsync response.StatusCode.ToString() returning Http Response enum remark ("Forbidden" for 403) . RemoteServiceErrorInfo.Code need status code integer value.

pull/21450/head
Dolunay 2 years ago
parent
commit
94ce08a245
  1. 4
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs

4
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs

@ -256,7 +256,7 @@ public class ClientProxyBase<TService> : ITransientDependency
new RemoteServiceErrorInfo
{
Message = response.ReasonPhrase,
Code = response.StatusCode.ToString(),
Code = $"{(int)response.StatusCode}",
Details = errorDescription
},
ex
@ -277,7 +277,7 @@ public class ClientProxyBase<TService> : ITransientDependency
new RemoteServiceErrorInfo
{
Message = response.ReasonPhrase,
Code = response.StatusCode.ToString(),
Code = $"{(int)response.StatusCode}",
Details = errorDescription
}
)

Loading…
Cancel
Save