Repository navigation
Fix contact method error not displayed when email exists - #80390
Conversation
|
@ikevin127 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3a35e35b7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Instead of wiping the LOGIN_LIST entry on failure (which erased server errors), we now set a generic fallback error. This way: 1. For specific errors (like "email exists"), the server's onyxData overrides the generic error 2. For generic server errors without onyxData, the fallback error is shown instead of leaving a stuck phantom entry
d3a35e3 to
167f3b6
Compare
| [contactMethod]: { | ||
| errorFields: { | ||
| addedLogin: ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('contacts.genericFailureMessages.addContactMethod'), | ||
| }, | ||
| }, |
There was a problem hiding this comment.
@MobileMage What happened with your proposal's solution - I thought you're only supposed to remove 7 lines but you changed your solution mid-flight to adding lines - what's the reasoning for this approach compared to your actual solution you proposed initially ?
There was a problem hiding this comment.
I did try that but got the error from Codex above. This is me trying to mitigate that.
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / Safariweb.movNativenative.mov |
|
♻️ Awaiting for PR Author Checklist to be completed since videos / screenshots are missing. Also awaiting on clarification on #80390 (comment) before completing review. |
|
Completed the checklist |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/nkuoch in version: 9.3.9-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.9-2 🚀
|
Explanation of Change
Removes the
LOGIN_LISTentry fromfailureDatainaddNewContactMethod. Previously, when adding a contact method with an email belonging to an existing account, the server would return an error inLOGIN_LIST[contactMethod].errorFields.addedLogin, but ourfailureDatawould then set[contactMethod]: null, wiping out the error. Now the server's error response is preserved and displayed to the user.Fixed Issues
$ #79672
PROPOSAL: #79672 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
79672-android-native.mp4
Android: mWeb Chrome
79672-android-web.mp4
iOS: Native
79672-ios-native.mp4
iOS: mWeb Safari
79672-ios-web.mp4
MacOS: Chrome / Safari
79672-d-web.mp4