Skip to content

Raise UnexpectedQueryResponseError for non-JSON Cloud Query bodies#3098

Open
adamtheturtle wants to merge 1 commit into
mainfrom
adamtheturtle/issue-3093-query-empty-4xx
Open

Raise UnexpectedQueryResponseError for non-JSON Cloud Query bodies#3098
adamtheturtle wants to merge 1 commit into
mainfrom
adamtheturtle/issue-3093-query-empty-4xx

Conversation

@adamtheturtle

Copy link
Copy Markdown
Member

Summary

  • Adds UnexpectedQueryResponseError for Cloud Query responses whose bodies are empty or not valid JSON.
  • Sync and async query clients catch json.JSONDecodeError and raise that exception with the full Response retained.
  • Tests cover empty and arbitrary-text 4xx responses for both clients.

Closes #3093.

Test plan

  • pytest for the new sync and async parametrized tests
  • CI green on this PR

Made with Cursor

Empty or arbitrary-text 4xx responses no longer surface as
JSONDecodeError. Closes #3093.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Cloud query clients raise JSONDecodeError for documented empty 4xx responses

1 participant