From f59a65a265220c98c60c557b34a45b89e18a3a6b Mon Sep 17 00:00:00 2001 From: Mauro Ghiani Date: Tue, 8 Oct 2024 10:24:00 +0000 Subject: [PATCH] Pipeline Sap Related work items: #490 --- .../Common/Fatture/Service/SynapseService.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Infrastructure/PortaleFatture.BE.Infrastructure/Common/Fatture/Service/SynapseService.cs b/src/Infrastructure/PortaleFatture.BE.Infrastructure/Common/Fatture/Service/SynapseService.cs index 6753fa9..4341ac7 100644 --- a/src/Infrastructure/PortaleFatture.BE.Infrastructure/Common/Fatture/Service/SynapseService.cs +++ b/src/Infrastructure/PortaleFatture.BE.Infrastructure/Common/Fatture/Service/SynapseService.cs @@ -56,10 +56,11 @@ public async Task InviaASapFatture(string? pipelineName, FatturaInvioSap p try { using var response = await httpClient.PostAsJsonAsync(requestUri, pipelineParameters); - if (!response.IsSuccessStatusCode) - _logger.LogError(503, "InviaASapFatture" + "|" + response.Serialize() + "|" + pipelineParameters.Serialize()); + var status = response.IsSuccessStatusCode; + if (!status) + _logger.LogError(503, "InviaASapFatture" + "|" + response.Serialize() + "|" + pipelineParameters.Serialize() + "|" + status); - return response.IsSuccessStatusCode; + return status; } catch (Exception ex) {