fix: WR-18424 handle transient orders sdk exceptions - #18
Merged
DustinK-retailsuccess merged 1 commit intoJun 9, 2026
Merged
DustinK-retailsuccess merged 1 commit into
DustinK-retailsuccess merged 1 commit into
Conversation
steven-palomino
approved these changes
Jun 9, 2026
DustinK-retailsuccess
deleted the
fixes/WR-18424-handle-transient-orders-sdk-exceptions
branch
June 9, 2026 00:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the following exception will result in a message being dead-lettered and not retried. However, this is a failure that should be retried as it's a temporary failure due to the Orders Micro being temporarily inaccessible.
This PR update the logic when interacting with the Orders SDK to be more resilient and inspect the exceptions thrown by the SDK to determine if they are temporary in nature (treat as transient and retry) or if they will continue to fail regardless how many retry attempts occur (DLQ like in a bad request scenario for an invalid Account Number).
{ "Timestamp": "2026-05-29T22:05:13.9063388+00:00", "Level": "Error", "MessageTemplate": "Unrecoverable error processing message. Dead-lettering.", "Exception": "System.Net.Http.HttpRequestException: Unknown socket error (orders.luci-dev:80)\n ---> System.Net.Sockets.SocketException (0xFFFDFFFE): Unknown socket error\n at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)\n at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)\n at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)\n --- End of inner exception stack trace ---\n at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)\n at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)\n at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)\n at System.Net.Http.HttpConnectionPool.InjectNewHttp11ConnectionAsync(QueueItem queueItem)\n at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)\n at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)\n at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)\n at System.Net.Http.SocketsHttpHandler.<SendAsync>g__CreateHandlerAndSendAsync|115_0(HttpRequestMessage request, CancellationToken cancellationToken)\n at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)\n at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)\n at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)\n at Refit.RequestBuilderImplementation.<>c__DisplayClass14_0`2.<<BuildCancellableTaskFuncForMethod>b__0>d.MoveNext() in /_/Refit/RequestBuilderImplementation.cs:line 256\n--- End of stack trace from previous location ---\n at Wayroo.Payments.ConfigurationRecorder.Lambda.Gateways.Propay.PropayStoreOwnerResolver.Resolve(Int64 accountNumber, CancellationToken cancellationToken) in /home/vsts/work/1/s/Wayroo.Payments.ConfigurationRecorder.Lambda/Wayroo.Payments.ConfigurationRecorder.Lambda/Gateways/Propay/PropayStoreOwnerResolver.cs:line 14\n at Wayroo.Payments.ConfigurationRecorder.Lambda.PaymentConfigurationMessageHandler.Handle(SQSMessage message, CancellationToken cancellationToken) in /home/vsts/work/1/s/Wayroo.Payments.ConfigurationRecorder.Lambda/Wayroo.Payments.ConfigurationRecorder.Lambda/PaymentConfigurationMessageHandler.cs:line 40\n at Wayroo.Payments.ConfigurationRecorder.Lambda.Function.FunctionHandler(SQSEvent input, ILambdaContext context) in /home/vsts/work/1/s/Wayroo.Payments.ConfigurationRecorder.Lambda/Wayroo.Payments.ConfigurationRecorder.Lambda/Function.cs:line 54", "Properties": { "SourceContext": "Wayroo.Payments.ConfigurationRecorder.Lambda.ProcessFailureHandler", "MessageId": "6ab71245-bbd5-43bc-a96e-7f86ff653b41", "TraceId": "Root=1-6a1a0d97-5a82ae5340232ad56cdad1e1;Parent=5d3aaedccf18ae1a;Sampled=0;Lineage=1:008a1e6d:0", "FunctionName": "dev-WayrooPayments-ConfigurationRecorderLambda", "AwsRequestId": "ad2f59d3-62cf-5e8a-916d-3b476d01344c", "InvokedFunctionArn": "arn:aws:lambda:us-east-1:203538442868:function:dev-WayrooPayments-ConfigurationRecorderLambda", "Scope": [ "6ab71245-bbd5-43bc-a96e-7f86ff653b41", "6ab71245-bbd5-43bc-a96e-7f86ff653b41" ] } }