Skip to content

feat(http): notify on 409 and support request-scoped notification suppression - #109

Merged
rdlabo merged 2 commits into
mainfrom
feat/http-error-notification-context
Nov 7, 2026
Merged

rdlabo merged 2 commits into
mainfrom
feat/http-error-notification-context

Conversation

@rdlabo

@rdlabo rdlabo commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

HTTP 409 responses with a server message currently bypass onServerError, leaving applications to duplicate notification handling. This adds 409 to the existing message hook and provides a request-scoped opt-out for screens that own their error UI.

Changes

  • Dispatch HTTP 409 body messages to onServerError, without retrying conflicts.
  • Export KIT_SKIP_ERROR_NOTIFICATIONS, a boolean HttpContextToken defaulting to false.
  • When enabled, suppress response-error notification hooks only. The original rejection still reaches the caller; authentication recovery/replay, access revocation, retries, offline fallback, and auth-header failure handling remain active.
  • Document the API and cover notification suppression, unchanged error identity, and 401 recovery/replay.

Validation

  • Kit tests: 59 files, 1126 tests passed.
  • npm run lint passed, including SQLite checks/tests (2 Node tests and 8 Vitest tests).
  • npm run prebuild:kit passed.
  • Prettier checks and git diff --check passed.

Scope and impact

Targets the current library main branch. Default notification behavior remains unchanged except for message-bearing 409 responses. No package release or consuming application changes are included.

Implements the shared-library prerequisite agreed in https://github.com/proschool-team/airlec2/pull/131. After this is merged and released, that application can wire common notifications and opt out for request-specific UI.

@rdlabo
rdlabo merged commit 6bd0940 into main Nov 7, 2026
16 checks passed
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