This commit is contained in:
Zeeshaun
2026-04-27 15:26:58 +00:00
parent 5f6f132ea2
commit 6291ac76dd
15 changed files with 56 additions and 37 deletions
@@ -1,4 +1,5 @@
using LCU.API.Internal.Operations.IncentiveApiLib.Repositories;
using LCU.API.Internal.Operations.IncentiveApi.Services;
using LCU.API.Internal.Operations.IncentiveApi.Services.Payout;
using LCU.Library.Internal.IncentiveApiModels.Common;
using LCU.Library.Internal.IncentiveApiModels.Requests;
@@ -31,14 +32,14 @@ public class ReportingService : IReportingService
_payoutService.CreateMonthlyAccountingPayouts(range).GetAwaiter().GetResult();
Log.Information($"Reporting Service processed");
_reportingProcessResult.MessageStack.Add($"Reporting Service Processed Month Starting {range.ToMonth}.");
await QueueReturnResponse.QueueResponse(request, _reportingProcessResult.Success, _reportingProcessResult.MessageStack);
await SafeQueueReturnResponse.TryQueueResponse(request, _reportingProcessResult.Success, _reportingProcessResult.MessageStack, nameof(ReportingService));
}
catch (Exception exception)
{
var message = $"There was an issue with handling the Reporting Service Process Exception Message: {exception.Message}.";
_reportingProcessResult.MessageStack.Add(message);
_reportingProcessResult.Success = false;
await QueueReturnResponse.QueueResponse(request, _reportingProcessResult.Success, _reportingProcessResult.MessageStack);
await SafeQueueReturnResponse.TryQueueResponse(request, _reportingProcessResult.Success, _reportingProcessResult.MessageStack, nameof(ReportingService));
}
}
}