3.8.1
Released
Fixes
A Supabase call that a gateway in front of Supabase answers with an HTML error page — Cloudflare's 502 during a blip — now fails with
Supabase gateway error (HTTP 502): 502 Bad Gatewayinstead of the whole page, so the worker's log line and Sentry issue title say what happened (Error: <html>before). Newapps/worker/src/supabase-error.tsreads the status and the page's<title>; a PostgREST or Postgres error keeps its message. Applied where the investigation path throws a Supabase error: the claim, the completion update and the prior-answers lookup (Sentry WORKER-1).
Technical changes· 2 entries for database, tooling, CI, tests and docs
Tooling & Configuration
The worker's investigation poll loop reports an outage to Sentry once it reaches 3 consecutive failures (about 15 s in, with the existing backoff), tagged with
consecutive_failures, instead of on the first. A single failed poll that recovers on the next one is still logged but no longer opens an issue and sends a "New issue" alert: WORKER-1 was one Cloudflare 502, and the poll 5 s later succeeded. Still one event per outage, and a new one after recovery (Sentry WORKER-1).
Tests
apps/worker/src/supabase-error.test.tscovers the Cloudflare 502 page from WORKER-1, a doctype and attributes, a page with no<title>, a long title, and PostgREST messages left untouched;loop.test.tsasserts one report per streak at the threshold and none for a blip that recovers first (Sentry WORKER-1).