[CP Staging] Search error state, distinguish stale search results from a real request failure - #101554
Conversation
The error view treated any non-invalid-query code as stale, so a server rejection (e.g. EXP_ERROR) offered refresh copy instead of a retry. The no-response case is now an explicit NO_RESPONSE sentinel in JSON_CODE, so only a request that never reached the server shows the refresh copy. Any real code keeps the error copy and gets a Try again button. Co-authored-by: Apex <noreply@callstack.com>
|
@codex review |
|
@MelvinBot review |
|
🤖 Review: the fix is correct. No blocking issues. The two things the fix depends on both hold:
Suggestions (none blocking)
Test steps verification (web)Non-401 rejection shows the generic error with
|
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
|
@getusha It's ready, I did small clean up after Melvin suggestion as it was getting messy after initial fix |
|
Fixed docs issue |
Reviewer Checklist
Screenshots/Videos |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
…101520 (cherry picked from commit 9df550a) (cherry-picked to staging by mountiny)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🔁 Filed a Staging retest request for deploy blockers #101520 after this PR was cherry-picked to staging. |
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.4.84-2 🚀
|
|
🤖 No help site changes are required for this PR, so I did not create a draft PR. This change only reroutes which transient error message the Search page shows when a request fails. It adds no feature, setting, label, or workflow, and it doesn't make any existing article inaccurate. Nothing under What I checkedI reviewed the four Search articles and verified their claims against the live UI on
One optional addition, your callThe help site has no FAQ covering a failed search, and this PR gives that case a distinct message and a retry path. If you want it documented, a short FAQ entry in
|
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.4.86-0 🚀
|
|
🤖 Yes, one help-site article needed updating. Draft PR: Docs updates for E/A#101554 Search error states and invalid operator FAQ The FAQ What happens if I enter an invalid operator? in I read every message, button, and toggle label off the running app on your branch rather than from
No other article under Compliance and checks
One thing to note: the docs PR branch lives on upstream, not on @LukasMod, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
Deploy Blocker #101554 was identified to be related to this PR. |
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.4.89-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.4.89-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.4.90-0 🚀
|












Explanation of Change
The error view treated any non-invalid-query code as stale, so a server rejection (e.g. EXP_ERROR) offered refresh copy instead of a retry. The no-response case is now an explicit NO_RESPONSE sentinel in JSON_CODE, so only a request that never reached the server shows the refresh copy. Any real code keeps the error copy and gets a Try again button.
402codetype:chat category:abcd401codetype:expenseeno response (0 code)type:expenseFixed Issues
$ #101520
PROPOSAL:
Tests
Test 1: Server rejects the query, code other than 401 - jsonCode 402 (the deploy blocker scenario)
type:chat category:abcd, submit.Test 2: Server rejects the query as invalid - jsonCode 401 INVALID_SEARCH_QUERY
type:expensee, submit.Test 3: Request failed before the server could answer - responseJsonCode NO_RESPONSE (0)
type:expense, submit.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
Android: mWeb Chrome
iOS: Native
Screen.Recording.2026-09-18.at.11.53.19.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-09-18.at.11.27.12.mov