Skip to content

Fix checkout flow calling processDeliveryItem on failure - #238

Open
sentry[bot] wants to merge 1 commit into
mainfrom
claude/fix-checkout-delivery-workflow-hejc1m
Open

Fix checkout flow calling processDeliveryItem on failure#238
sentry[bot] wants to merge 1 commit into
mainfrom
claude/fix-checkout-delivery-workflow-hejc1m

Conversation

@sentry

@sentry sentry Bot commented Jul 16, 2026

Copy link
Copy Markdown

Summary

The Android checkout flow unconditionally calls processDeliveryItem() after every checkout attempt — even when the backend returns HTTP 500. Additionally, processDeliveryItem() unconditionally throws a BackendAPIException, so it always fails regardless of checkout success.

Changes

  1. Gate processDeliveryItem() on successful HTTP response only — on HTTP error (e.g. 500 from /checkout), finish the transaction with INTERNAL_ERROR without attempting the delivery workflow.

  2. Remove unconditional throw BackendAPIException from processDeliveryItem() — the method now completes normally, setting the span status to OK.

  3. Remove processDeliveryItem() call from onFailure callback — a network failure also means checkout did not succeed, so the delivery workflow should not be attempted.

Fixes ANDROID-J4

- Gate processDeliveryItem() on successful HTTP response only; on HTTP
  error (e.g. 500 from /checkout), finish the transaction with
  INTERNAL_ERROR without attempting the delivery workflow.
- Remove unconditional 'throw BackendAPIException' from
  processDeliveryItem() so it completes normally on success.
- Remove processDeliveryItem() call from onFailure callback since a
  network failure also means checkout did not succeed.

Fixes [ANDROID-J4](https://demo.sentry.io/issues/7576244315/)
@sentry
sentry Bot requested a review from sdzhong as a code owner July 16, 2026 04:22
@sentry

sentry Bot commented Jul 16, 2026

Copy link
Copy Markdown
Author

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Android com.example.vu.android 24.12.26 (241226) release
Android com.example.vu.android 24.12.26 (241226) debug
Android com.example.vu.android 24.12.26 (241226) release

⚙️ android Build Distribution Settings

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.

1 participant