Skip to main content

Customer Portal — Failure Modes

Status: populated Owner: Product Engineering (Frontend) Last updated: 2026-04-18

1. Failure Taxonomy

ModeDetectionPortal BehaviorRecovery
Kong gateway down502/504 from fetchFull-page error boundary; "Service temporarily unavailable" messageAuto-retry with exponential backoff on next navigation
auth-service down502 on /v1/auth/me or /v1/auth/firebaseLogin fails with "Authentication service unavailable" toastRetry on next login attempt
JWT expired (normal)401 from KongMiddleware transparently refreshes using __refresh cookieSilent; user unaffected
JWT expired + refresh token expired401 from refresh endpointRedirect to /login?reason=session_expiredUser re-authenticates
Firebase Auth outageFirebase SDK error during signInWithEmailAndPasswordError toast: "Sign-in service unavailable. Please try again."Retry when Firebase recovers
billing-service down502 on /v1/billing/*/billing page shows error state card; rest of portal unaffectedManual refresh
webhook-dispatcher down502 on /v1/webhooks/*/webhooks page shows error state; no cascading effectManual refresh
Rate limiting (429)429 from KongToast: "Rate limit exceeded — try again shortly."Wait and retry
API key creation fails4xx/5xx on POST /v1/api-keysModal shows error message; no raw key displayedUser retries
Network timeout (server component)fetch AbortErrorPage renders error boundary componentNext navigation re-fetches
Sentry unavailableSDK init failurePortal continues normally; errors not captured externally

2. Partial Degradation Strategy

The portal's layout is divided into independent data-fetching sections. A failure in one section does not break others:

  • Dashboard summary cards each use independent Suspense boundaries with ErrorBoundary wrappers.
  • If usage data fails to load, the API key count card still renders.
  • The test SMS sender is independent of the message log; each has its own error boundary.

3. Auth Failure Escalation

Request to protected route
└─► middleware reads __session cookie
├─ Valid JWT → proceed
├─ Expired JWT + valid __refresh → refresh silently → set new cookies → proceed
└─ Both invalid/missing
└─► Redirect to /login?redirect=<original-path>
└─► User authenticates → redirected back to original path

4. Known Limitations

LimitationImpactMitigation
No real-time message status updatesDelivered status only visible after page refreshAdd SSE/polling in post-MVP
Firebase Auth as single IdPFirebase outage blocks all loginsEmail magic link fallback planned for v2
No offline supportPortal unusable without networkPWA offline mode not in scope