Skip to content

fix(postgrest): describe non-PostgREST JSON error bodies by their status - #2063

Merged
spydon merged 1 commit into
mainfrom
lukasklingsbo/sdk-2823-postgrest-non-postgrest-json-error-bodies
Nov 16, 2026
Merged

spydon merged 1 commit into
mainfrom
lukasklingsbo/sdk-2823-postgrest-non-postgrest-json-error-bodies

Conversation

@spydon

@spydon spydon commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #2061 with the review findings that missed the merge. SDK-2823.

  • A JSON error body without a message, as a gateway sends ({"error": "unauthorized"}, {}), is described by the status phrase and the Proxy-Status code, with the body in details, instead of "Unknown error" with no code.
  • The charset of Content-Type is parsed with the standard library instead of a hand-written tokenizer.
  • A later PostgREST member of Proxy-Status with an error is read when the first one has none.

…tus and parse the charset with the standard library
@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: efc51981-d7f1-41f0-b5f2-343a0ca32c44
Commits

Reviewing files that changed from the base of the PR and between 90d19c9 and 7ab86a4.

Files selected for processing: 3

  • src/postgrest/src/postgrest/exceptions.py
  • src/postgrest/src/postgrest/request_builder.py
  • src/postgrest/tests/test_api_error.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@spydon
spydon merged commit 7d0ff4a into main Nov 16, 2026
27 checks passed
@spydon
spydon deleted the lukasklingsbo/sdk-2823-postgrest-non-postgrest-json-error-bodies branch November 16, 2026 10:37
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.

1 participant