fix(profile): surface the real /auth/me failure mode in the error banner #380

Merged
YousifShkara merged 1 commit from fix/MAPPS-331-profile-load-error into main 2026-06-29 07:47:59 +02:00
Owner

MAPPS-331: the "Could not load your profile. Refresh the page to retry." banner is a generic fallback the resource hook renders for ANY non-success from /auth/me, because the page calls get_authed::<MeResponse>(...).ok() and collapses status + body + decode errors into a bare None. That keeps the actual fault hidden behind a DevTools dig, and is the reason the symptom is hard to reproduce off a screenshot.

Switch to get_authed_typed::<MeResponse>(...), keep the ApiError on the resource, and render the user-facing message (e.g. "Your session has expired", "The server hit an error") plus the structured Display (e.g. "http 403: ...") underneath. The page now reads as a diagnostic so a future regression names itself, and the first MAPPS-331 reproduction lands with the failure mode attached instead of "the banner showed up again".

This is the diagnostic step the ticket asks for in step 1; the actual server- vs client-side fix follows whatever the captured status code points at.

#MAPPS-331

MAPPS-331: the "Could not load your profile. Refresh the page to retry." banner is a generic fallback the resource hook renders for ANY non-success from /auth/me, because the page calls `get_authed::<MeResponse>(...).ok()` and collapses status + body + decode errors into a bare `None`. That keeps the actual fault hidden behind a DevTools dig, and is the reason the symptom is hard to reproduce off a screenshot. Switch to `get_authed_typed::<MeResponse>(...)`, keep the `ApiError` on the resource, and render the user-facing message (e.g. "Your session has expired", "The server hit an error") plus the structured `Display` (e.g. "http 403: ...") underneath. The page now reads as a diagnostic so a future regression names itself, and the first MAPPS-331 reproduction lands with the failure mode attached instead of "the banner showed up again". This is the diagnostic step the ticket asks for in step 1; the actual server- vs client-side fix follows whatever the captured status code points at. #MAPPS-331
fix(profile): surface the real /auth/me failure mode in the error banner
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 1m21s
Create release / Create release from merged PR (pull_request) Has been skipped
5f9b94cf71
MAPPS-331: the "Could not load your profile. Refresh the page to retry." banner is a generic fallback the resource hook renders for ANY non-success from /auth/me, because the page calls `get_authed::<MeResponse>(...).ok()` and collapses status + body + decode errors into a bare `None`. That keeps the actual fault hidden behind a DevTools dig, and is the reason the symptom is hard to reproduce off a screenshot.

Switch to `get_authed_typed::<MeResponse>(...)`, keep the `ApiError` on the resource, and render the user-facing message (e.g. "Your session has expired", "The server hit an error") plus the structured `Display` (e.g. "http 403: ...") underneath. The page now reads as a diagnostic so a future regression names itself, and the first MAPPS-331 reproduction lands with the failure mode attached instead of "the banner showed up again".

This is the diagnostic step the ticket asks for in step 1; the actual server- vs client-side fix follows whatever the captured status code points at.

#MAPPS-331
YousifShkara deleted branch fix/MAPPS-331-profile-load-error 2026-06-29 07:47:59 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!380
No description provided.