Skip to content

fix(phone): stop reporting expected phone-parse failures as notifiable Bugsnag warnings#1064

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/expected-phone-parse-errors-not-notifiable
Jul 10, 2026
Merged

fix(phone): stop reporting expected phone-parse failures as notifiable Bugsnag warnings#1064
bmc08gt merged 1 commit into
code/cashfrom
fix/expected-phone-parse-errors-not-notifiable

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

PhoneUtils.makeE164 reported NumberParseException via ErrorUtils.handleError when a user's entered number failed to parse for the selected region — an expected condition mid-onboarding phone verification, surfaced in production Bugsnag as a notifiable warning.

Swallow NumberParseException/NumberFormatException silently and return "", matching the sibling toE164/parseInternationalNumber/isPhoneNumberValid methods. Genuinely unexpected exceptions are still routed through ErrorUtils.handleError.

Adds PhoneUtilsTest coverage for cleanNumber: valid national/plus-prefixed numbers format to E164, expected parse failures are swallowed without reporting, and unexpected failures are still reported.

…e Bugsnag warnings

PhoneUtils.makeE164 reported NumberParseException via ErrorUtils.handleError when
a user's entered number failed to parse for the selected region — an expected
condition mid-onboarding phone verification, surfaced in production Bugsnag as a
notifiable warning.

Swallow NumberParseException/NumberFormatException silently and return "",
matching the sibling toE164/parseInternationalNumber/isPhoneNumberValid methods.
Genuinely unexpected exceptions are still routed through ErrorUtils.handleError.

Adds PhoneUtilsTest coverage for cleanNumber: valid national/plus-prefixed
numbers format to E164, expected parse failures are swallowed without reporting,
and unexpected failures are still reported.

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
@bmc08gt bmc08gt self-assigned this Jul 10, 2026
@github-actions github-actions Bot added type: fix Bug fix area: phone and removed type: fix Bug fix labels Jul 10, 2026
@bmc08gt bmc08gt merged commit a09f8c1 into code/cash Jul 10, 2026
3 checks passed
@bmc08gt bmc08gt deleted the fix/expected-phone-parse-errors-not-notifiable branch July 10, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant