From 8b528fa00b442d411a526384643ddcfd6763446c Mon Sep 17 00:00:00 2001 From: Zeeshaun Date: Mon, 27 Apr 2026 15:27:15 +0000 Subject: [PATCH] Updating --- .../Services/SafeQueueReturnResponse.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 LCU.API.Operations.IncentiveAPI/LCU.API.Internal.Operations.IncentiveApi/Services/SafeQueueReturnResponse.cs diff --git a/LCU.API.Operations.IncentiveAPI/LCU.API.Internal.Operations.IncentiveApi/Services/SafeQueueReturnResponse.cs b/LCU.API.Operations.IncentiveAPI/LCU.API.Internal.Operations.IncentiveApi/Services/SafeQueueReturnResponse.cs new file mode 100644 index 0000000..3ad067f --- /dev/null +++ b/LCU.API.Operations.IncentiveAPI/LCU.API.Internal.Operations.IncentiveApi/Services/SafeQueueReturnResponse.cs @@ -0,0 +1,19 @@ +using System.Collections.Generic; +using LCU.Library.Internal.ApiResponse.Services; + +namespace LCU.API.Internal.Operations.IncentiveApi.Services; + +public static class SafeQueueReturnResponse +{ + public static async Task TryQueueResponse(TRequest request, bool success, List messageStack, string context) + { + try + { + await QueueReturnResponse.QueueResponse(request, success, messageStack ?? new List()); + } + catch (Exception exception) + { + Log.Error(exception, "Failed to queue return response for {Context}.", context); + } + } +}