Skip to content

Improve error handling in the scan survey QR flow#3732

Merged
shobhitagarwal1612 merged 1 commit into
masterfrom
andreia/3639/improve-error-handling
May 13, 2026
Merged

Improve error handling in the scan survey QR flow#3732
shobhitagarwal1612 merged 1 commit into
masterfrom
andreia/3639/improve-error-handling

Conversation

@andreia-ferreira
Copy link
Copy Markdown
Collaborator

This PR improves error handling when there are network issues while scanning a survey QR code, or if there are problems launching the ML kit barcode scanner. Changes include:

  • new ScannerUnavailable error type for when the ML Kit barcode scanner module fails to install or is unavailable on the device
  • updated toSurveySelectorError() to distinguish network-related failures from generic ones by mapping them to the existing Timeout error type, which already prompts the user to check their connection.

@shobhitagarwal1612 PTAL?

@auto-assign auto-assign Bot requested a review from gino-m May 12, 2026 16:17
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 64.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.03%. Comparing base (19bdde7) to head (284b305).

Files with missing lines Patch % Lines
...droid/ui/surveyselector/SurveySelectorViewModel.kt 69.56% 3 Missing and 4 partials ⚠️
...ndroid/ui/surveyselector/SurveySelectorFragment.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3732      +/-   ##
============================================
- Coverage     68.06%   68.03%   -0.03%     
- Complexity     1609     1613       +4     
============================================
  Files           370      370              
  Lines          9513     9526      +13     
  Branches       1238     1246       +8     
============================================
+ Hits           6475     6481       +6     
- Misses         2360     2365       +5     
- Partials        678      680       +2     
Files with missing lines Coverage Δ
...m/android/ui/surveyselector/SurveySelectorEvent.kt 100.00% <ø> (ø)
...ndroid/ui/surveyselector/SurveySelectorFragment.kt 70.37% <0.00%> (-5.63%) ⬇️
...droid/ui/surveyselector/SurveySelectorViewModel.kt 79.34% <69.56%> (-3.37%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shobhitagarwal1612 shobhitagarwal1612 merged commit 1576b6c into master May 13, 2026
13 checks passed
@shobhitagarwal1612 shobhitagarwal1612 deleted the andreia/3639/improve-error-handling branch May 13, 2026 02:23
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.

2 participants