Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2023-11-21] [$250] Add error handling to readFilyAsync #24141

Closed
luacmartins opened this issue Aug 4, 2023 · 32 comments
Closed
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@luacmartins
Copy link
Contributor

luacmartins commented Aug 4, 2023

Problem

We added the ability to request money with a scanned receipt in this PR, but there's no error handling if we fail to read the file before sending the request

Why is this important

Informs users that there was something wrong so it's not confusing for them.

Solution

Add error handling

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0116eda5bd8fef8746
  • Upwork Job ID: 1716521658283470848
  • Last Price Increase: 2023-10-30
  • Automatic offers:
    • DylanDylann | Contributor | 27491365
@luacmartins luacmartins added the Weekly KSv2 label Aug 4, 2023
@luacmartins luacmartins self-assigned this Aug 4, 2023
@melvin-bot melvin-bot bot added the Overdue label Aug 14, 2023
@luacmartins
Copy link
Contributor Author

Will work on this this week.

@melvin-bot melvin-bot bot removed the Overdue label Aug 14, 2023
@melvin-bot melvin-bot bot added the Overdue label Aug 23, 2023
@luacmartins
Copy link
Contributor Author

Not a priority. I'll try to work on it next week.

@melvin-bot melvin-bot bot removed the Overdue label Aug 23, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 1, 2023
@luacmartins
Copy link
Contributor Author

Not a priority. I'll try to work on it next week.

@melvin-bot melvin-bot bot removed the Overdue label Sep 1, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 11, 2023
@luacmartins
Copy link
Contributor Author

Not a priority

@melvin-bot melvin-bot bot removed the Overdue label Sep 12, 2023
@luacmartins luacmartins mentioned this issue Sep 20, 2023
59 tasks
@melvin-bot melvin-bot bot added the Overdue label Sep 20, 2023
@luacmartins
Copy link
Contributor Author

I'll try to get to this this week. We also have an additional consideration that sometimes selecting a file in iOS just fails.

@melvin-bot melvin-bot bot removed the Overdue label Sep 21, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 29, 2023
@luacmartins
Copy link
Contributor Author

Not a priority

@melvin-bot melvin-bot bot removed the Overdue label Oct 3, 2023
@melvin-bot melvin-bot bot added the Overdue label Oct 12, 2023
@luacmartins
Copy link
Contributor Author

Not a priority

@melvin-bot melvin-bot bot removed the Overdue label Oct 13, 2023
@melvin-bot melvin-bot bot added the Overdue label Oct 23, 2023
@luacmartins
Copy link
Contributor Author

I think we can clean up the method by adding onSuccess and onFailure callback params to it and then just calling onFailure in the catch instead of resolving the promise. That also cleans up the need to have promise chaining in other files. Gonna make this external.

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2023
@luacmartins luacmartins added the External Added to denote the issue can be worked on by a contributor label Oct 23, 2023
@melvin-bot melvin-bot bot changed the title Add error handling to readFilyAsync [$500] Add error handling to readFilyAsync Oct 23, 2023
@luacmartins luacmartins added the Bug Something is broken. Auto assigns a BugZero manager. label Oct 23, 2023
@luacmartins
Copy link
Contributor Author

Here's an example. When the user uploaded a receipt and refreshed the page, we'd fail to load the file because the browser would get rid of the temp url. We have since fixed that issue, but I think we can clean it up with the solution I described here

@DylanDylann
Copy link
Contributor

@luacmartins Thanks for your explanation.
Currently, If user reload page, the browser gets rid of the temp URL and the App will redirect to Scan screen (upload receipt screen)
Do you mean when the browser gets rid of the temp URL, we need to redirect the user to Scan screen and display a message like: "Please help to post receipt again"

@luacmartins
Copy link
Contributor Author

No, we should still reroute the user. This is just a refactor of the current solution.

@melvin-bot melvin-bot bot removed the Overdue label Oct 31, 2023
@DylanDylann
Copy link
Contributor

@robertKozik Updated proposal for more detail
cc @luacmartins

@robertKozik
Copy link
Contributor

Great! Thanks @DylanDylann for updating your proposal. I think we are GTG
🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Nov 2, 2023

Current assignee @luacmartins is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 2, 2023
Copy link

melvin-bot bot commented Nov 2, 2023

📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Nov 4, 2023
@DylanDylann
Copy link
Contributor

@robertKozik The PR is ready for review

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 14, 2023
@melvin-bot melvin-bot bot changed the title [$250] Add error handling to readFilyAsync [HOLD for payment 2023-11-21] [$250] Add error handling to readFilyAsync Nov 14, 2023
Copy link

melvin-bot bot commented Nov 14, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 14, 2023
Copy link

melvin-bot bot commented Nov 14, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.98-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-11-21. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Nov 14, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@robertKozik] The PR that introduced the bug has been identified. Link to the PR:
  • [@robertKozik] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@robertKozik] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@robertKozik] Determine if we should create a regression test for this bug.
  • [@robertKozik] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@conorpendergrast] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Nov 21, 2023
@conorpendergrast
Copy link
Contributor

Payouts due:

Upwork job is here.

@melvin-bot melvin-bot bot removed the Overdue label Nov 23, 2023
@conorpendergrast
Copy link
Contributor

This looks like a known uncaught error in a new feature rather than a bug itself, so I don't think we need the C+ checklist here. Closing out, reopen or comment if you disagree!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

4 participants