feat(EConnectClient): Logik hinzufügen, um zu behandeln, wenn bei einem Fehler kein Inhalt vorhanden ist
This commit is contained in:
@@ -132,7 +132,9 @@ public class EConnectClient<TError> : IEConnectClient<TError> where TError : cl
|
|||||||
}
|
}
|
||||||
else
|
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()
|
return new()
|
||||||
{
|
{
|
||||||
Ok = false,
|
Ok = false,
|
||||||
|
|||||||
Reference in New Issue
Block a user