Replay a unanimous upstream rejection instead of a 502 #23

Merged
benvin merged 1 commits from benvin/upstream-errors into main 2026-09-07 23:07:56 +10:00
Member

Every backend gets the same query, so one they all refuse is the client's mistake; flattening it into "all backends failed" threw openvoxdb's own explanation away and logged a typo as an outage.

  • Carry status, content type and body on a typed upstreamError
  • Replay the status and explanation when every backend refuses alike
  • Keep 403/404/408/429, disagreeing statuses and every 5xx on the 502 path
  • Redact backend addresses from replayed bodies
  • Keep a refused query out of the partial counters and the cache
Every backend gets the same query, so one they all refuse is the client's mistake; flattening it into "all backends failed" threw openvoxdb's own explanation away and logged a typo as an outage. - Carry status, content type and body on a typed `upstreamError` - Replay the status and explanation when every backend refuses alike - Keep 403/404/408/429, disagreeing statuses and every 5xx on the 502 path - Redact backend addresses from replayed bodies - Keep a refused query out of the partial counters and the cache
unkin-agent added 1 commit 2026-09-07 22:40:10 +10:00
Replay a unanimous upstream rejection instead of a 502
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
bfe28b488d
Every backend gets the same query, so one they all refuse is the client's
mistake; flattening it into "all backends failed" threw openvoxdb's own
explanation away and logged a typo as an outage.

- Carry status, content type and body on a typed upstreamError
- Replay the status and explanation when every backend refuses alike
- Redact backend addresses from replayed bodies
- Keep a refused query out of the partial counters and the cache
benvin merged commit 6a3b277e5e into main 2026-09-07 23:07:56 +10:00
benvin deleted branch benvin/upstream-errors 2026-09-07 23:07:56 +10:00
Sign in to join this conversation.