[Payment due @huult] Use error message from server for scan failed receipts#87111
[Payment due @huult] Use error message from server for scan failed receipts#87111chiragsalian merged 8 commits intomainfrom
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@arosiclair 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: 15d5caaa84
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Nice, excited for this!
arosiclair
left a comment
There was a problem hiding this comment.
LGTM other than the codex comment. @MonilBhavsar can you get a C+ to test?
|
@huult is going to review this |
|
@MonilBhavsar please resolve the conflict |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-04-15.at.21.42.20.mp4Android: mWeb ChromeScreen.Recording.2026-04-15.at.21.47.46.mp4iOS: HybridAppScreen.Recording.2026-04-15.at.21.51.49.mp4iOS: mWeb SafariScreen.Recording.2026-04-15.at.21.52.46.mp4MacOS: Chrome / SafariScreen.Recording.2026-04-15.at.21.39.22.mp4 |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@MonilBhavsar The error message on the receipt side still uses the translation message. Do we need to update it to make it consistent? |
Screen.Recording.2026-04-09.at.12.14.13.mov@MonilBhavsar In your attachment, I see 3 failed receipts, and each failed receipt shows a different error message. However, I can't reproduce this behavior. I tried uploading 3 failed receipts and received the same error message each time: "The receipt couldn't be scanned, as it's missing a merchant, date, or amount." |
|
Ah please hold on. We cannot test the different message flow yet because server side PR is not deployed |
|
Could you let me know when it's ready? Thanks! |
|
@huult this is ready for test now |
It's a generic violation message. So we're not updating it here. Only concierge and notification message is updated in this PR series. |
@MonilBhavsar It looks like this error message may not be valid because the recipe is in a failed state, not a “recipe not clean / couldn’t read” state. |
@MonilBhavsar The message says: “The date couldn’t be read from this receipt. Please enter it manually.” |
The message "the receipt couldn't be read. Please upload a clearer photo." is displayed when our smart scan could not read any fields and tells us receipt is "illegible", so it's an expected case. |
Yeah fair point! By default we use current date, and I believe we want to continue using it. By letting the user know, they can update it to correct date if they want |
|
@chiragsalian 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] |
|
🎯 @huult, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
so many reviewers 😅 imma just move this forward |
|
🚧 @chiragsalian has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ 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/chiragsalian in version: 9.3.60-0 🚀
Bundle Size Analysis (Sentry): |
|
I reviewed the changes in this PR and the help site articles under PR Summary: This PR changes the receipt scan failure message from a hardcoded generic string ("Receipt scanning failed") to display the specific error message returned by the server (e.g., "The receipt couldn't be scanned, as it's missing a merchant, date, or amount."), with the generic message as a fallback. Help site impact: No changes required. I searched all help site articles that reference SmartScan and receipt scanning — none of them document specific scan failure error messages. The articles cover SmartScan usage, merge behavior, and general workflows, but they don't describe the text of error messages shown when a scan fails. Since this PR only makes existing error messages more descriptive (not a new feature or workflow), no documentation updates are needed. |
|
Deploy Blocker #88033 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.60-22 🚀
|
|
🤖 Payment issue created: #88399 |




Explanation of Change
Display error message from server. Fallback to default generic message
Fixed Issues
Part of https://github.com/Expensify/Expensify/issues/613984
PROPOSAL:
Tests
The new feature tests with Auth PR https://github.com/Expensify/Auth/pull/20814
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari