This commit is contained in:
Zeeshaun
2026-04-23 16:27:51 +00:00
parent 9daf7b0f01
commit ecd687d973
12 changed files with 8 additions and 25 deletions
@@ -5,7 +5,6 @@ using LCU.Library.Internal.IncentiveApiModels.Entities;
using LCU.Library.Internal.IncentiveApiModels.Common;
using LCU.Library.Internal.IncentiveApiModels.Requests;
using LCU.Library.Internal.ApiResponse.Services;
using LCU.Library.Internal.Exceptions;
using ProcessResult = LCU.Library.Internal.IncentiveApiModels.Results.ProcessResult;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.Payout;
@@ -46,11 +45,11 @@ public class PayoutService : IPayoutService
catch (Exception exception)
{
Log.Fatal(exception, "There was an Unhandled error with Monthly Incentive Payout Process");
var message = $"There was an Unhandled error with Monthly Incentive Payout Process from {request.MonthsBack} months back from today's date. Exception Message: {exception.Message}.";
var monthsBack = request?.MonthsBack.ToString() ?? "unknown";
var message = $"There was an Unhandled error with Monthly Incentive Payout Process from {monthsBack} months back from today's date. Exception Message: {exception.Message}.";
_payoutIncentiveProcessResult.MessageStack.Add(message);
_payoutIncentiveProcessResult.Success = false;
await QueueReturnResponse.QueueResponse(request, _payoutIncentiveProcessResult.Success, _payoutIncentiveProcessResult.MessageStack);
throw new ServiceException(message);
}
}