Skip to content

fix(postgrest): throw a PostgrestException for a non-JSON 2xx body - #459

Merged
Tr00d merged 2 commits into
supabase:masterfrom
fresh55:fix/postgrest-non-json-success-body
Oct 2, 2026
Merged

Tr00d merged 2 commits into
supabase:masterfrom
fresh55:fix/postgrest-non-json-success-body

Conversation

@fresh55

@fresh55 fresh55 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

closes #260

a 2xx body that isn't JSON, like a proxy's html error page, now throws a PostgrestException instead of a JsonException, on table queries and Rpc<T>.

on Rpc<T>, JSON that doesn't fit T now also throws a PostgrestException, with the JsonException inside. table queries still throw the plain JsonException for that.

Comment thread packages/Postgrest/Postgrest/Client.cs Outdated
Comment thread packages/Postgrest/Postgrest/Client.cs Outdated
@Tr00d Tr00d self-assigned this Sep 30, 2026
@fresh55

fresh55 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

@Tr00d thanks for the review! Rpc<T> now deserializes inside the try catch.

I left the helper in Postgrest since moving it to Core means new public API. happy to move it there like you suggested in #460? and is the Rpc<T> behaviour change in the description ok with you?

@fresh55
fresh55 requested a review from Tr00d September 30, 2026 18:05
@Tr00d
Tr00d merged commit 5a815e6 into supabase:master Oct 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parity(postgrest): return structured error for non-JSON body on successful 2xx responses [from supabase-js]

2 participants