Fix/404 detail not found errors#350
Closed
chuks68 wants to merge 3 commits into
Closed
Conversation
chuks68
force-pushed
the
fix/404-detail-not-found-errors
branch
from
July 21, 2026 20:42
5cd0d64 to
5bea467
Compare
Contributor
|
Thanks — after resolving the merge, this ends up fully redundant with main: the PoolsPanel memoization and SettlementTable responsive card-layout content already landed via #349/#352, and the 404 detail-page messaging commit here matches what's already on main too. Zero net diff left, so closing as already covered rather than merging a duplicate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #131
This PR improves error-handling UX for missing resources in details panels. Previously, all asynchronous error states were rendered as flat red messages using state.message, which did not distinguish a 404 Not Found response from a 500 Server Error or a network failure.
Changes
src/hooks/useAsync.ts: Updated the custom hook to store and expose the original error object (state.error?: unknown) under the async state so components can inspect details beyond just the stringified message.
src/components/AnchorDetail.tsx: Checks if the async loader error is an ApiRequestError with status code 404 and displays a distinct "Anchor not found" message with a link back to /anchors instead of the generic red text.
src/components/SettlementDetail.tsx: Applies identical logic to render a distinct "Settlement not found" message with a link back to /settlements.
src/components/AnchorDetail.test.tsx: Added a mock unit test covering the 404 error branch for the anchor details loader.
src/components/SettlementDetail.test.tsx: Added a mock unit test covering the 404 error branch for the settlement details loader.