From c9b6c4f1e3ceef96a76fbef2f2379b4075813f08 Mon Sep 17 00:00:00 2001 From: "ENDAVA\\mzorec" Date: Tue, 3 Jan 2023 10:33:20 +0100 Subject: [PATCH] Fixes status code. --- src/FlubuCore.WebApi.Client/RestClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FlubuCore.WebApi.Client/RestClient.cs b/src/FlubuCore.WebApi.Client/RestClient.cs index a674419c..167868d1 100644 --- a/src/FlubuCore.WebApi.Client/RestClient.cs +++ b/src/FlubuCore.WebApi.Client/RestClient.cs @@ -195,7 +195,7 @@ protected async Task GetResponse(HttpResponseMessage response) } catch (Exception e) { - throw new WebApiException(HttpStatusCode.InternalServerError, $"Deserialization failed: StatusCode: {response.StatusCode} Headers: {response.Headers}, RequestMessage: {response.RequestMessage}, Content: {errorString}", e); + throw new WebApiException(response.StatusCode, $"Deserialization failed: StatusCode: {response.StatusCode} Headers: {response.Headers}, RequestMessage: {response.RequestMessage}, Content: {errorString}", e); } throw new WebApiException(response.StatusCode, errorString)