Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.36k stars 2.79k forks source link

Split bill - Split bill with invalid phone number format show undefined #22264

Closed kbecciv closed 1 year ago

kbecciv commented 1 year ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

1.Click + button=> Split bill

  1. Input any number => Next
  2. Search and select invalid email eg: @.com
  3. Next => Split bill

Expected Result:

Error message invalid email not for select

Actual Result:

Screen show "Uh-oh, something went wrong!"

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Version Number: 1.3.36-4 Reproducible in staging?: n/a Reproducible in production?: n/a If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation

https://github.com/Expensify/App/assets/93399543/9c49daaa-6c8f-46b3-8bc5-e1d8622bca8e

Screenshot 2023-07-05 at 16 23 43

Expensify/Expensify Issue URL: Issue reported by: @namhihi237 Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688495292236699

View all open jobs on GitHub

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @sophiepintoraetz (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

hoangzinh commented 1 year ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

Split bill - Split bill with invalid phone number format show undefined

What is the root cause of that problem?

The error log in this case: Screenshot 2023-07-05 at 22 34 23

When we request split bill with incorrect email address, the BE will clear optimistic reportActions in FE by set them to null Screenshot 2023-07-05 at 22 35 06 It make this reportAction here to be null => raise error when access to its errors key https://github.com/Expensify/App/blob/e937c43fc9515dae60a49e9012398ffd5a463c45/src/pages/home/sidebar/SidebarLinks.js#L333

What changes do you think we should make in order to solve the problem?

We can use lodashGet here to ensure it won't raise error when the reportAction is null.

hungvu193 commented 1 year ago

Dupe of https://github.com/Expensify/App/issues/21675