fix(settings): add fallback text to webauthn error mapping and clarify field names#20417
Open
vpomerleau wants to merge 1 commit intomainfrom
Open
fix(settings): add fallback text to webauthn error mapping and clarify field names#20417vpomerleau wants to merge 1 commit intomainfrom
vpomerleau wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the passkeys WebAuthn error mapping in fxa-settings to make localization usage clearer and to provide a single source of truth for both Fluent IDs and English fallback strings.
Changes:
- Renames the error message identifier fields to
ftlId(frommessageKeys/userMessageKey) for clearer semantics. - Adds
fallbackText(English) alongside each FTL ID in the WebAuthn error map. - Refactors unexpected-error defaults into shared constants and updates tests to include fallback-related assertions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/fxa-settings/src/lib/passkeys/webauthn-errors.ts | Renames message key fields, adds per-operation fallbackText, and introduces shared unexpected-error constants. |
| packages/fxa-settings/src/lib/passkeys/webauthn-errors.test.ts | Updates assertions to use ftlId and adds coverage for fallbackText. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+165
to
+166
| ftlId: UNEXPECTED_FTL_ID, | ||
| fallbackText: UNEXPECTED_FALLBACK, |
Comment on lines
+33
to
+35
| expect(result.ftlId).toContain(operation); | ||
| expect(result.ftlId).toMatch(/passkey-.+-error-.+/); | ||
| expect(result.fallbackText).toMatch(/passkey/i); |
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.
Because
This pull request
Issue that this pull request solves
Issue: FXA-12912
Checklist
Put an
xin the boxes that applyHow to review (Optional)
Screenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
Any other information that is important to this pull request.