• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase / 42687769335
87%

Build:
DEFAULT BRANCH: master
Ran 09 Nov 2026 07:59PM UTC
Jobs 1
Files 194
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Nov 2026 07:54PM UTC coverage: 87.157% (-0.005%) from 87.162%
42687769335

push

github

web-flow
feat(studio): classify fetch-layer errors with endpoint and method (#53048)

## Problem

Follow-up to #52730. Resolves part of FE-4772.

Fetch failures and aborts were classified as `UnexpectedError`, and HTTP
error responses with empty, HTML, or plain-text bodies did too.

## Solution

**Network failures and aborts keep their classification.**
`fetchHandler` used to rewrite `Failed to fetch` into a plain `Error`,
so openapi-fetch network failures were classified as `UnexpectedError`.
It now throws `classifyError(err, { endpoint, method })`, giving
`NetworkUnreachable` (same user-facing message, original error as
`cause`) or `RequestAborted`. The endpoint comes from `schemaPath`,
recorded in `onRequest`.

Tagged aborts are no longer named `AbortError`, so `isRequestAborted()`
checks for both. `state/storage-explorer.tsx` uses it, so cancelling a
folder load no longer shows an error toast.

**One place reads error responses.** `readResponseError` in
`data/error-classification.ts` turns an HTTP error response into a
`RawResponseError`. It reads the status, `Retry-After`, the message from
a JSON body or a short `text/plain` body (never HTML), plus `requestId`,
`endpoint`, and `method`. The openapi-fetch middleware serializes its
result into the error body. openapi-fetch builds `error` only from the
response body, so that step can't be skipped. `parseResponseErrorBody`
now only checks the shape. Empty, HTML, and plain-text error bodies now
classify by status. Before, they became `UnexpectedError`.

`fetchGet`/`fetchPost`/`fetchHeadWithTimeout` (Studio's own `/api`
routes) use the same helper. This also fixes a non-JSON error body
making them reject with a `SyntaxError`.

**`requestPathname` is replaced by `endpoint`.** The no-retry list and
the statement-timeout check in `query-client.ts` match OpenAPI patterns
exactly. Critical error messages in `lib/error-reporting.ts` use the
pattern, so concrete project refs stay out of them. `path-to-regexp` is
no lo... (continued)

2101 of 2476 branches covered (84.85%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 1 file covered. (100.0%)

2887 of 3247 relevant lines covered (88.91%)

201.66 hits per line

Subprojects
ID Flag name Job ID Ran Files Coverage
1 studio-tests 42687769335.1 09 Nov 2026 07:59PM UTC 776
38.76
GitHub Action Run
Source Files on build 42687769335
  • Tree
  • List 194
  • Changed 161
  • Source Changed 2
  • Coverage Changed 161
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #42687769335
  • 3a76beea on github
  • Prev Build on master (#42667484518)
  • Next Build on master (#42745066710)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc