Skip to content

[TransactionMobile] Add exception-path coverage for sale transaction HTTP failures #658

Description

@StuartFerguson

Background

TransactionProcessor#1840 shows a Sentry failure on the sale transaction request path, with the stack landing in LoggingHttpMessageHandler.SendCoreAsync.

The sale flows in this repo all go through TransactionProcessor.Mobile.BusinessLogic.Services.TransactionService.SendTransactionRequest(...) before posting to api/saletransactions, but the current tests only cover successful responses and non-2xx HTTP statuses.

Scope

Add test coverage for the shared api/saletransactions path when the HTTP client pipeline throws during SendAsync or message-handler execution.

Cover the following flows:

  • PerformMobileTopup
  • PerformVoucherIssue
  • PerformBillPaymentGetAccount
  • PerformBillPaymentMakePayment
  • PerformBillPaymentGetMeter

Expected behavior

  • The service returns a failed result instead of crashing the caller.
  • The failure path is exercised when the handler throws, not just when the response status is non-success.
  • Any logging or exception wrapping remains observable and covered by test.

Acceptance criteria

  • A test fails if the HTTP pipeline throws before a response is returned.
  • Success and non-2xx coverage remains green for the sale transaction path.
  • The issue is traceable back to TransactionProcessor#1840.

Notes

If the exception is swallowed by a shared HTTP wrapper, place the test at the lowest layer where the exception is actually thrown.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions