Skip to content

fix(settings): stop a failed user settings load from raising an unhandled error - #331

Merged
MrYuion merged 1 commit into
developfrom
t3/fix-backoffice-4t
Oct 29, 2026
Merged

MrYuion merged 1 commit into
developfrom
t3/fix-backoffice-4t

Conversation

@MrYuion

@MrYuion MrYuion commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Sentry BACKOFFICE-4T: TypeError: Load failed on iOS. The user settings request failed while the page was navigating away. SettingsService.init() runs from the constructor and nothing awaits it, so the failed request became an unhandled rejection and went to Sentry.

Now init() catches the failure, logs a warning, and keeps the default settings.

Proof: a new unit test fails without the fix (init() rejects with Load failed) and passes with it. I also ran an ad hoc Playwright check on the mock backend (Chromium and WebKit) with the settings request forced to fail. Before the fix, [Unhandled rejection] TypeError: Load failed reached the error handler. After the fix, only the warning logs and the app loads. Unit tests (1085), lint and build pass.

Reviewed with sol-loop: 1 round with gpt-6.1-sol on high. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

…dled error

SettingsService.init() runs from the constructor and nothing awaits it.
When the user settings request failed (Safari reports "TypeError: Load
failed" when the page navigates away mid-request), the rejection was
unhandled and went to Sentry. Catch it, log a warning and keep the
default settings.

Fixes BACKOFFICE-4T

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 29, 2026

Copy link
Copy Markdown

Deployment failed for project backoffice with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/placeos?upgradeToPro=build-rate-limit

@MrYuion
MrYuion merged commit 6b447ea into develop Oct 29, 2026
5 of 6 checks passed
@MrYuion
MrYuion deleted the t3/fix-backoffice-4t branch October 29, 2026 02:30
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.

1 participant