Lemon-miaow
2a8f897e61
fix(api): a session-store outage answers 503, not 401
...
Resolving a session cookie failed identically whether the credential was
missing or Postgres was unreachable: local_auth_enabled read errors fell into
the fail-closed 'disabled' branch and SessionUser errors into 'invalid
session', both surfacing as 401 'authentication required' — a lie that reads
as 'log in again' during an outage. Split the enabled-read into
(enabled, error), tag non-ErrNotFound store failures with errAuthBackend, and
map that to a new 503 auth_unavailable in requireExternal. Fail-closed is
unchanged: missing setting / bad value / missing session stay 401.
2026-09-22 20:30:43 +08:00
..
2026-09-22 20:30:43 +08:00
2026-09-22 17:49:54 +08:00
2026-07-20 11:10:23 +09:00
2026-07-07 10:04:30 +09:00
2026-07-07 10:04:30 +09:00
2026-07-05 16:22:08 +08:00
2026-06-26 23:32:38 +09:00
2026-09-22 20:30:43 +08:00
2026-07-02 03:30:50 +08:00
2026-09-22 12:57:19 +09:00
2026-07-05 20:50:48 +09:00
2026-07-05 20:50:48 +09:00
2026-07-20 04:47:32 +09:00
2026-07-20 04:47:32 +09:00
2026-07-20 04:47:32 +09:00
2026-07-20 04:47:32 +09:00
2026-07-04 21:47:12 +09:00
2026-07-04 21:47:12 +09:00
2026-07-04 21:47:12 +09:00
2026-07-07 19:32:13 +09:00
2026-07-08 05:58:00 +09:00
2026-07-07 19:32:13 +09:00
2026-06-26 23:32:38 +09:00
2026-06-26 23:32:38 +09:00
2026-06-26 23:32:38 +09:00
2026-07-22 14:40:42 +09:00
2026-07-21 00:11:40 +09:00
2026-07-20 14:33:29 +09:00
2026-07-20 14:33:29 +09:00
2026-09-22 14:17:53 +09:00
2026-09-22 14:17:53 +09:00
2026-06-26 23:32:38 +09:00
2026-07-20 11:10:23 +09:00
2026-09-22 13:44:38 +09:00
2026-07-04 21:47:12 +09:00
2026-07-01 22:04:19 +09:00
2026-07-20 04:47:32 +09:00
2026-07-20 04:47:32 +09:00
2026-07-20 11:10:23 +09:00
2026-07-20 11:10:23 +09:00
2026-07-05 16:02:30 +09:00
2026-07-05 16:02:30 +09:00
2026-07-16 13:26:56 +09:00
2026-07-16 13:26:56 +09:00
2026-07-16 13:26:56 +09:00
2026-07-05 02:05:44 +08:00
2026-07-04 21:47:12 +09:00
2026-07-05 04:05:56 +09:00
2026-07-20 04:47:32 +09:00
2026-07-22 14:40:28 +09:00
2026-09-22 12:43:54 +09:00
2026-07-22 14:40:28 +09:00
2026-07-01 18:26:42 +09:00
2026-07-01 18:17:07 +09:00
2026-07-01 18:17:07 +09:00
2026-09-22 17:49:54 +08:00
2026-09-22 17:57:03 +08:00
2026-06-26 23:32:38 +09:00
2026-06-26 23:32:38 +09:00
2026-07-01 22:04:19 +09:00
2026-07-21 00:12:37 +09:00
2026-07-21 00:12:37 +09:00
2026-07-01 23:06:26 +09:00
2026-09-22 13:31:53 +09:00
2026-07-01 21:07:08 +09:00
2026-09-22 20:30:43 +08:00
2026-07-04 04:08:14 +08:00
2026-09-22 20:08:38 +08:00
2026-07-20 04:47:32 +09:00
2026-06-26 23:32:38 +09:00
2026-06-26 23:32:38 +09:00
2026-09-22 20:30:43 +08:00
2026-07-02 23:38:46 +08:00
2026-07-02 23:38:46 +08:00
2026-07-04 21:47:12 +09:00