bee20506
web: tell a database outage from a missing database
loadRepoForBrowse turned any error from GetRepoByOwnerAndName into a 404, so a metadata store that could not answer told every reader on the instance that their database does not exist — for as long as Postgres was down, in the voice reserved for "there is nothing here". loadRepoForAdmin did the same on the settings page. Both classify through repoLookupFailed now: db.ErrNotFound keeps the 404, and it stays the same 404 the visibility rule renders for a PRIVATE database the caller may not see, so a masked database and a missing one remain indistinguishable. Anything else is a 500 through the shared error page, with the cause logged (slog + scribe.Err) and never rendered.
Eugene Blikh <bigbes@gmail.com> — 2026-08-13 07:16:35 UTC
Commit bee205061dd2fcfc291046ffad18878ccfcacf5f —
view raw patch
Parent(s):
ebbd30fe
| File | Status | + | − |
|---|---|---|---|
web/handlers_settings.go
|
M | +5 | -1 |
web/router.go
|
M | +47 | -2 |
web/web_test.go
|
M | +72 | -1 |