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

supabase / supabase-flutter / 28231764812
86%

Build:
DEFAULT BRANCH: main
Ran 26 Jun 2026 10:16AM UTC
Jobs 8
Files 80
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

26 Jun 2026 10:14AM UTC coverage: 85.592% (+0.03%) from 85.559%
28231764812

push

github

web-flow
fix(postgrest): return structured error for non-JSON body on 2xx responses (#1474)

## What

When a PostgREST request succeeds (2xx status) but the response body is
not valid JSON (for example, an HTML `502 Bad Gateway` page from a
proxy, or a truncated response), the SDK now throws a structured
`PostgrestException` carrying the raw body, status code, and reason
phrase.

## Why

The previous handling caught the `FormatException` and set `body =
null`, which behaved badly:
- For `.select()` (return type `PostgrestList`), the `null` flowed into
`PostgrestList.from(null)` and crashed with an opaque `TypeError`.
- For `.maybeSingle()`/`.single()`, it silently returned `null`, making
a proxy's HTML error page indistinguishable from "no rows".

This is the Dart equivalent of the supabase-js structured-error /
`throwOnError` behavior, since the Dart builder always throws on error
rather than returning a `{data, error}` shape.

## Not a breaking change

CSV and `pgrst.plan+text` bodies are handled before the JSON decode, so
the only bodies reaching this branch are genuinely malformed. Today
those either crash with an opaque error or return a misleading `null`,
so converting them into a clean `PostgrestException` is a bug fix.

## Tests

Added a `non-json-succ` mock route returning `200` with an HTML body,
covering both `.select()` and `.maybeSingle()` paths.

Closes SDK-1029. Parity with supabase/supabase-js#2398.

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

4105 of 4796 relevant lines covered (85.59%)

3.65 hits per line

Jobs
ID Job ID Ran Files Coverage
6 postgrest - 28231764812.6 26 Jun 2026 10:17AM UTC 9
84.31
GitHub Action Run
7 supabase - 28231764812.7 26 Jun 2026 10:16AM UTC 15
81.99
GitHub Action Run
8 supabase_flutter - 28231764812.8 26 Jun 2026 10:17AM UTC 11
77.52
GitHub Action Run
7 yet_another_json_isolate - 27986095786.7 22 Jun 2026 09:45PM UTC 1
79.03
GitHub Action Run
8 realtime_client - 28190414303.8 25 Jun 2026 06:08PM UTC 11
88.5
GitHub Action Run
7 gotrue - 28227073552.7 26 Jun 2026 08:41AM UTC 26
84.31
GitHub Action Run
4 functions_client - 27986095786.4 22 Jun 2026 09:45PM UTC 2
97.14
GitHub Action Run
5 storage_client - 28160249676.5 25 Jun 2026 09:26AM UTC 5
92.97
GitHub Action Run
Source Files on build 28231764812
  • Tree
  • List 80
  • Changed 4
  • Source Changed 4
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28231764812
  • 2d7c9cf5 on github
  • Prev Build on main (#28227073552)
  • Next Build on main (#28241867675)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc