Repository navigation
Replies: 1 comment
|
You can keep using var res = await WebApi.MyMethod();
if (!res.IsSuccessStatusCode)
{
_errorText = res.HasResponseError(out var error)
? error.Content ?? error.Message
: res.Error?.Message ?? "Error";
return;
}
I understand that the extra step makes this less obvious after upgrading. These helpers are available on non-generic |
Uh oh!
There was an error while loading. Please reload this page.
After last updates it became difficult to access error content for calls:
where result is either OK or error like BadRequest with error text content
Before I did it such way:
but now I need do not forget to use extension method for this:
because no Content available in IApiResponse and I can't use ApiResponse without
<T>parameter in definition.All reactions