show error view when query explicitly fails#58054
Conversation
|
@shubham1206agra 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] |
|
@shubham1206agra I will update your feedback tomorrow. |
|
@huult Fix conflict here. |
|
@shubham1206agra it's done |
|
We have conflicts again 😅 |
|
@shubham1206agra it's done |
Screen.Recording.2025-03-28.at.11.41.18.AM.mov@huult Can you check why I see empty result modal briefly when I switch to narrow layout? |
|
Good catch on that one! |
I am checking! |
|
@shubham1206agra After we resized the screen, the category was lost, as shown in the video below. As a result, the error page was lost because when the category is missing, the API query is successful. Kindly, I think this is not related to this PR. Screen.Recording.2025-04-01.at.11.14.00.mp4 |
|
hmm yea, I agree that's a separate issue. We just seem to drop the invalid filters when making the request after the resize (same behavior on main/staging/prod), so NAB for this PR. |
|
@shubham1206agra let's continue with review |
| const selectedTransactionsKeys = useMemo(() => Object.keys(selectedTransactions ?? {}), [selectedTransactions]); | ||
| const shouldShowSelectedDropdown = headerButtonsOptions.length > 0 && (!shouldUseNarrowLayout || (!!selectionMode && selectionMode.isEnabled)); | ||
|
|
||
| const hasErrors = Object.keys(currentSearchResults?.errors ?? {}).length > 0 && !isOffline; |
There was a problem hiding this comment.
@huult QQ: Why are we not showing errors when we are offline?
There was a problem hiding this comment.
We don't run any search offline, so I'm not sure there's a use case for this
There was a problem hiding this comment.
@shubham1206agra This error is from the API response, so offline mode cannot be used for this.
There was a problem hiding this comment.
@huult What's the issue here? Can you write the steps here.
There was a problem hiding this comment.
I'm not sure that I understand @shubham1206agra. As @huult pointed out, we only show this error when the API response fails, so we need to be online to do so.
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / SafariScreen.Recording.2025-04-02.at.10.35.28.PM.mov |
|
@shubham1206agra let me know when you're done with the review |
|
@huult we have conflicts now |
|
@luacmartins it's done |
|
✋ 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/luacmartins in version: 9.1.24-2 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.1.24-10 🚀
|
1 similar comment
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.1.24-10 🚀
|
|
This case was not considered in the PR. |





Details
Fixed Issues
$ #55817
PROPOSAL: #55817 (comment)
Tests
Same QA step
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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
Screen.Recording.2025-03-10.at.13.19.45.mp4
Android: mWeb Chrome
Screen.Recording.2025-03-10.at.13.21.48.mp4
iOS: Native
Screen.Recording.2025-03-10.at.13.22.57.mp4
iOS: mWeb Safari
Screen.Recording.2025-03-10.at.13.23.42.mp4
MacOS: Chrome / Safari
Screen.Recording.2025-03-10.at.13.24.17.mp4
MacOS: Desktop
Screen.Recording.2025-03-09.at.00.28.35.mp4