feat(EConnectClient): Logik hinzufügen, um zu behandeln, wenn bei einem Fehler kein Inhalt vorhanden ist
This commit is contained in:
parent
21cc348c6c
commit
060ba64268
@ -132,7 +132,9 @@ public class EConnectClient<TError> : IEConnectClient<TError> where TError : cl
|
||||
}
|
||||
else
|
||||
{
|
||||
var error = await res.Content.ReadFromJsonAsync<TError>(_options.JsonSerializerOptions, cancel);
|
||||
TError? error = null;
|
||||
if (res.Content.Headers.ContentLength > 0)
|
||||
error = await res.Content.ReadFromJsonAsync<TError>(_options.JsonSerializerOptions, cancel);
|
||||
return new()
|
||||
{
|
||||
Ok = false,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user