Skip to content

Commit

Permalink
177902-Exception logs format fixed AB#177902
Browse files Browse the repository at this point in the history
  • Loading branch information
pravinvarade10801 committed Oct 3, 2024
1 parent 0cc0c73 commit 2df535b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/UKHO.ERPFacade.API/Controllers/WebhookController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public virtual async Task<IActionResult> NewEncContentPublishedEventReceived([Fr

if (!response.IsSuccessStatusCode)
{
throw new ERPFacadeException(EventIds.RequestToSapFailed.ToEventId(), "An error occurred while sending a request to SAP. | {StatusCode}", response.StatusCode);
throw new ERPFacadeException(EventIds.RequestToSapFailed.ToEventId(), $"An error occurred while sending a request to SAP. | {response.StatusCode}");
}
_logger.LogInformation(EventIds.EncUpdateSentToSap.ToEventId(), "ENC update has been sent to SAP successfully. | {StatusCode}", response.StatusCode);

Expand Down Expand Up @@ -216,7 +216,7 @@ public virtual async Task<IActionResult> LicenceUpdatedPublishedEventReceived([F

if (!response.IsSuccessStatusCode)
{
throw new ERPFacadeException(EventIds.ErrorOccurredInSapForLicenceUpdatedPublishedEvent.ToEventId(), "An error occurred while sending licence updated event data to SAP. | {StatusCode}", response.StatusCode);
throw new ERPFacadeException(EventIds.ErrorOccurredInSapForLicenceUpdatedPublishedEvent.ToEventId(), $"An error occurred while sending licence updated event data to SAP. | {response.StatusCode}");
}

_logger.LogInformation(EventIds.LicenceUpdatedPublishedEventUpdatePushedToSap.ToEventId(), "The licence updated event data has been sent to SAP successfully. | {StatusCode}", response.StatusCode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public async Task MergeRecordOfSaleEvents(QueueMessage queueMessage)

if (!response.IsSuccessStatusCode)
{
throw new ERPFacadeException(EventIds.ErrorOccurredInSapForRecordOfSalePublishedEvent.ToEventId(), "An error occurred while sending record of sale event data to SAP. | _X-Correlation-ID : {_X-Correlation-ID} | EventID : {EventID} | StatusCode: {StatusCode}", message.CorrelationId, message.EventId, response.StatusCode);
throw new ERPFacadeException(EventIds.ErrorOccurredInSapForRecordOfSalePublishedEvent.ToEventId(), $"An error occurred while sending record of sale event data to SAP. | _X-Correlation-ID : {message.CorrelationId} | EventID : {message.EventId} | StatusCode: {response.StatusCode}");
}

_logger.LogInformation(EventIds.RecordOfSalePublishedEventDataPushedToSap.ToEventId(), "The record of sale event data has been sent to SAP successfully. | _X-Correlation-ID : {_X-Correlation-ID} | EventID : {EventID} | StatusCode: {StatusCode}", message.CorrelationId, message.EventId, response.StatusCode);
Expand All @@ -96,7 +96,7 @@ public async Task MergeRecordOfSaleEvents(QueueMessage queueMessage)
}
catch (Exception)
{
throw new ERPFacadeException(EventIds.UnhandledWebJobException.ToEventId(), "Exception occurred while processing Event Aggregation WebJob. | _X-Correlation-ID : {_X-Correlation-ID} | EventID : {EventID}", message.CorrelationId, message.EventId);
throw new ERPFacadeException(EventIds.UnhandledWebJobException.ToEventId(), $"Exception occurred while processing Event Aggregation WebJob. | _X-Correlation-ID : {message.CorrelationId} | EventID : {message.EventId}");
}
}
}
Expand Down

0 comments on commit 2df535b

Please sign in to comment.