-
Notifications
You must be signed in to change notification settings - Fork 3k
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-12-06] [HOLD for payment 2023-12-04] Distance - Wrong error message is shown when creating an invalid distance request #31834
Comments
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
📣 @github-actions[bot]! 📣
|
Triggered auto assignment to @iwiznia ( |
Looks like a regression of #29790 |
It indeed looks like a regression of that PR.. @Gonals can you take a look? Otherwise we can revert... |
TBH I think we should revert given the comments on the PR after it was merged. That being said, a clean revert is no longer possible |
Yeah, going to wait for monday so that Alberto can take a look. It's not like we want to deploy today... |
Haha I was trying to deploy or at least leave the checklist clear for monday morning deploy, but there are so many open blockers 😅 |
You crazy man, it's friday and most of the company is OOO and/or traveling 😄 |
Anyways, I got the revert PR ready if we decide to go that way - #31854 |
@luacmartins @iwiznia if i am not wrong the receipt for the distance request is created on Backend and we use placeholder image as optimistic data so if request fails in any case a receipt is never generated for the distance request, Right? In thats the case we can just skip using "Download file" message if file is never generated for failure scenario, and just use the |
@ishpaul777 no, it's local file download. Not from server. Just to help user not re-scan receipt in case upload failed for some reason.
With this local download feature, user can download scanned receipt to device and re-upload importing from gallery. |
For distance receipts, there's nothing to download, so that message does not make sense. |
yeah, I am talking about scan receipt, not distance receipt. So this is bug anyway |
This is what i was meant to say, I can raise a quick PR with fix then we CP to staging instead of reverting Changesjust add below condition here and pass transaction to _.isEmpty(receipt) || TransactionUtils.isDistanceRequest(transaction) |
I don't think the implementation of this error is correct. If there was an error uploading the receipt, that's a server side error and we should be sending an |
In any case a request fails, we want the user to have option to download receipt if he added otherwise it will be lost no matter the reason request fails as far as i understand, so i think its fine to use failuredata here |
Correct. If the user uploaded a file, we want to ensure the file is not lost and they can download it. |
@luacmartins For receipt money requests, shouldn't we allow the user to download the file irrespective of the error, as we will remove the request after clicking the dismiss button? I think the error message structure can be:
Something on the line of this. On the second line, we can put the condition for the non-empty receipt. If you want to go this way, I can try to resolve this. |
Another thing, backend doesn't send anything except error status code when I send corrupted file as receipt. I think backend can send error for onyx in this case. |
The issue here as i understand is is specific to Distance request only, "Download file" message does not makes sense in any case as user can add(replace) a receipt only request is successful and initail receipt is a created on backend and use a placeholder image till the request is successful, that is root cause we see a "download file" message for distance request as receipt is not empty, soultion to this can be as simple as to not set error message to "download file" for distance request.
if there is a error and request is failed, we show the user to download the file (corrupted in this case) why do we want BE to send a error for currupted receipt? |
I think there is a issue already created which will remove the optimistic receipt from Distance request.
To differentiate from other errors. |
This is the issue #28965. Here, we will replace the placeholder image to optimistic map component. |
Okay, as i skimming through issue we will use a snapshot image of route as initial receipt unless request is successful,still the question is same why we show download file message when user haven't added one? |
Nope we are not using an image there |
Assigning @0xmiroslav as he was C+ on the PR and created a follow up partial revert |
Okay! 👍 makes sense , after linked issue is resolved then there is no optimistic receipt object so it fallbacks to generic error message, my proposed changes does achieve the same as it uses generic error message for every distance request which i thought is fine for now as this was a Deploy blocker and that feature is holding for other GH, anyways if we are going to revert offending PR then i think holding for the linked issue might be a good idea |
This is fixed in staging, given @0xmiroslav has been C+ on the offending PR which will have to be completed I think payments will be handled there and we can close this one |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.3-11 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-12-04. 🎊 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.
For reference, here are some details about the assignees on this issue:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.4-3 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-12-06. 🎊 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.
For reference, here are some details about the assignees on this issue:
|
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.3.0
Reproducible in staging?: y
Reproducible in production?: n
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
The error message that will be shown is "Unexpected error requesting money, please try again later"
Actual Result:
The error message is "The receipt didn't upload. Download the file or dismiss this error and lose it" instead of the usual "Unexpected error requesting money, please try again later".
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6289525_1700832005026.bandicam_2023-11-24_15-34-26-832.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: