Fix ANDROID-DN: Remove deliberate exception in processDeliveryItem#204
Draft
cursor[bot] wants to merge 1 commit intomainfrom
Draft
Fix ANDROID-DN: Remove deliberate exception in processDeliveryItem#204cursor[bot] wants to merge 1 commit intomainfrom
cursor[bot] wants to merge 1 commit intomainfrom
Conversation
Fixes ANDROID-DN The processDeliveryItem method was deliberately throwing a BackendAPIException when called during checkout failures. This was causing unnecessary exception reports to Sentry when the real issue is a backend failure. Changed to gracefully handle the checkout failure by: - Logging a warning instead of error - Setting span status to ABORTED instead of INTERNAL_ERROR - Removing the deliberate exception throw This prevents false-positive error reports while still properly tracking that the delivery workflow was skipped due to checkout failure.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #204 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 16 16
Lines 864 858 -6
Branches 65 64 -1
=====================================
+ Misses 864 858 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
Fixes ANDROID-DN - MainFragment$BackendAPIException: Failed to init delivery workflow
Problem
The
processDeliveryItemmethod was deliberately throwing aBackendAPIExceptionwhen called during checkout failures. This was causing unnecessary exception reports to Sentry when the real issue is a backend failure (not an Android app issue).Solution
Changed the method to gracefully handle checkout failures by:
ABORTEDinstead ofINTERNAL_ERRORImpact
Testing
The fix removes a deliberately thrown exception that was always being triggered on checkout failures, replacing it with proper error handling using span status tracking.