Summary: - Wrap OAuth provider calls in try/catch and return a structured error when the provider is unreachable. - Show a user-friendly message in the UI when sign in fails due to provider unavailability. - Add unit tests for the failure path and an e2e test for UI behavior. Files changed: - frontend/src/lib/server/auth.ts - frontend/src/components/SignInButton.tsx (or equivalent) - tests/unit/auth.spec.ts - tests/e2e/auth-provider-failure.spec.ts Why: - Prevents frontend crashes/hangs when third-party auth services are down. - Improves UX and observability. How tested: - Unit tests added for provider failure and 5xx responses. - Playwright e2e simulating provider downtime and asserting the error toast. Notes: - Logging added but no sensitive data is recorded. - Telemetry hook included; configure Sentry/monitoring DSN as needed. Checklist: - [x] Wrap provider calls in try/catch and return structured error response - [x] Return HTTP 502 with `OAUTH_PROVIDER_UNAVAILABLE` / `OAUTH_PROVIDER_ERROR` - [x] Show readable error message in UI - [x] Add unit tests - [x] Add e2e test - [x] Add telemetry/logging statement
Summary:
Files changed:
Why:
How tested:
Notes:
Checklist:
OAUTH_PROVIDER_UNAVAILABLE/OAUTH_PROVIDER_ERROR