Skip to content

fix(error-handling): route API failures through handleApiError#216

Merged
LucHeart merged 1 commit into
developfrom
fix/error-handling-gaps
Jun 18, 2026
Merged

fix(error-handling): route API failures through handleApiError#216
LucHeart merged 1 commit into
developfrom
fix/error-handling-gaps

Conversation

@hhvrc

@hhvrc hhvrc commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Close several spots where API failures were swallowed or surfaced inconsistently:

  • dialog-publicshare-delete: add missing .catch (was an unhandled rejection)
  • FirmwareChannelSelector: catch channel-version fetch failures
  • user-selector: surface non-404 errors instead of treating every failure as 'user not found'
  • pwnedPasswords: throw on non-ok response instead of silently returning 0
  • oauth signup create: drop dead console.log debug and let handleApiError surface validation messages; surface signup-data fetch errors
  • PauseToggle / MultiPauseToggle / edit-share: use handleApiError instead of hand-rolled toasts that leaked raw error.message and bypassed the 401 hook; fixes a double-toast in MultiPauseToggle

Close several spots where API failures were swallowed or surfaced
inconsistently:
- dialog-publicshare-delete: add missing .catch (was an unhandled rejection)
- FirmwareChannelSelector: catch channel-version fetch failures
- user-selector: surface non-404 errors instead of treating every failure
  as 'user not found'
- pwnedPasswords: throw on non-ok response instead of silently returning 0
- oauth signup create: drop dead console.log debug and let handleApiError
  surface validation messages; surface signup-data fetch errors
- PauseToggle / MultiPauseToggle / edit-share: use handleApiError instead of
  hand-rolled toasts that leaked raw error.message and bypassed the 401 hook;
  fixes a double-toast in MultiPauseToggle
@hhvrc hhvrc requested a review from LucHeart June 18, 2026 11:53
@hhvrc hhvrc self-assigned this Jun 18, 2026
@LucHeart LucHeart merged commit c5fa0d3 into develop Jun 18, 2026
10 checks passed
@LucHeart LucHeart deleted the fix/error-handling-gaps branch June 18, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants