diff --git a/src/Arbus.Network/NativeHttpClient.cs b/src/Arbus.Network/NativeHttpClient.cs index 70622cf..0fe6f19 100644 --- a/src/Arbus.Network/NativeHttpClient.cs +++ b/src/Arbus.Network/NativeHttpClient.cs @@ -78,7 +78,7 @@ public virtual Task EnsureSuccessResponse(HttpResponseMessa public virtual Task HandleNotSuccessStatusCode(HttpResponseMessage response) { - if (response.Content.Headers.ContentType.MediaType == HttpContentType.Application.ProblemJson) + if (response.Content.Headers.ContentType?.MediaType == HttpContentType.Application.ProblemJson) return HandleProblemDetailsResponse(response); else return HandleAnyResponse(response);