Draft
Conversation
…UTHN/HSM to SERVER_ERRORS/CLIENT_ERRORS/LOCAL_ERRORS Reorganize error grouping by HTTP status type instead of technology source: - BACKEND.* → CLIENT_ERRORS.* (all are 4xx API responses) - GENERIC.CLIENT_ERROR/SERVER_ERROR/LOCAL_ERROR → CLIENT_ERRORS/SERVER_ERRORS/LOCAL_ERRORS.UNHANDLED - WEBAUTHN.* → LOCAL_ERRORS.WEBAUTHN.* (nested under LOCAL_ERRORS) - HSM.* → LOCAL_ERRORS.HSM.* (nested under LOCAL_ERRORS) Also remove unused REASON/BACKEND_MESSAGE values, remove reason from success result types, improve helpers.ts fallback logic with case-insensitive matching, and update ReasonValue type to handle 3-level nesting via DeepLeafValues.
- Remove DeepLeafValues duplication: define once in VALUES.ts, export ReasonValue for types.ts to alias as MultifactorAuthenticationReason - Move CLIENT_ERRORS.UNHANDLED from ROUTINE_FAILURES to ANOMALOUS_FAILURES since unexpected 4xx responses may indicate a bug or API change - Return undefined reason for 200 success responses without SUCCESS map entry instead of misleading LOCAL_ERRORS.UNHANDLED; update parseHttpRequest, ProcessResult, ChallengeResponse, and ScenarioResponse types accordingly - Add fallback reasons in SET_ERROR dispatches and null guard in failureScreens lookup for type safety - Pass httpStatusCode and message to all SET_ERROR dispatches that use a generic fallback reason - Document empty API_RESPONSE_MAP entries as relying on fallback reasons
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
… UNHANDLED_ERROR to UNHANDLED_EXCEPTION UNHANDLED and UNHANDLED_ERROR were ambiguous. UNHANDLED_API_RESPONSE clarifies it's the HTTP no-status fallback, while UNHANDLED_EXCEPTION clarifies it catches code exceptions and invalid states.
…RANSACTION_UNAVAILABLE as ANOMALOUS These rare edge cases may indicate bugs and were previously unclassified, meaning they would be logged as UNCLASSIFIED instead of at 'error' level.
Better describes intent: function determines screen routing, not error classification.
- DENY_TRANSACTION SUCCESS branch (typeof responseMapEntry === 'string')
- Empty source map fallback (CHANGE_CARD_PIN with 4xx)
- endsWith prefix tolerance ('Error: Registration required' matches 'Registration required')
REASON.LOCAL_ERRORS.WEBAUTHN values no longer mirror DOMException.name strings. A dedicated DOM_EXCEPTION_NAME_MAP in WebAuthn.ts maps DOMException names to REASON constants (same pattern HSM already uses). Also forwards DOMException.message for known errors.
Make vague fallback reasons more descriptive so they are self-explanatory in logs without needing to cross-reference code.
Prefix every REASON string with its origin category (Server, Client, Local, Local WebAuthn, Local HSM) so the source is immediately visible in logs without needing to look up the constant key.
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.
Explanation of Change
Fixed Issues
$ #83036
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari