Skip to content

Handle proxy timeouts - #1885

Merged
StuartFerguson merged 1 commit into
mainfrom
task/#1871_proxy_error_handling
Aug 17, 2026
Merged

StuartFerguson merged 1 commit into
mainfrom
task/#1871_proxy_error_handling

Conversation

@StuartFerguson

Copy link
Copy Markdown
Member

Summary

Harden the operator proxies so downstream timeout and transport exceptions are converted into clean failure results instead of bubbling out as unhandled exceptions.

What changed

  • Added exception handling around the PataPawa PostPay verify-account and process-bill paths.
  • Added similar guards to the PataPawa PrePay meter and vend paths.
  • Wrapped outbound calls in Safaricom Pinless, Agency Banking, and Voucher Management so downstream failures return Result.Failure(...).
  • Added regression tests covering timeout failures across the proxy families.

Why

Issue #1871 showed that the verify-account flow could fail noisily on timeout. The broader scan showed the same missing boundary in other operator proxy methods, so the fix was expanded for consistency.

Validation

  • dotnet test TransactionProcessor.BusinessLogic.Tests\TransactionProcessor.BusinessLogic.Tests.csproj --filter "FullyQualifiedName~ProxyTests"
  • Result: 89 passed, 0 failed

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 8 complexity

Metric Results
Complexity 8

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@StuartFerguson StuartFerguson linked an issue Aug 17, 2026 that may be closed by this pull request
@StuartFerguson
StuartFerguson marked this pull request as ready for review August 17, 2026 10:15
@StuartFerguson
StuartFerguson merged commit 92753ac into main Aug 17, 2026
6 checks passed
@github-actions
github-actions Bot deleted the task/#1871_proxy_error_handling branch October 17, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle PataPawaPostPay verify-account timeouts more gracefully

1 participant