Skip to content

Raise InvalidResponseBodyError for every unparsable response body #1094

Closed

Description

@vdusek

InvalidResponseBodyError is raised only by KeyValueStoreClient.get_record() (_resource_clients/key_value_store.py:62). Every other method parses the body with response.json() through response_to_dict() / response_to_list() (_utils/http.py:83), so a malformed body surfaces as a bare json.JSONDecodeError or ValueError.

The JS client raises InvalidResponseBodyError for any response body it can't parse.

Expected behavior

Every method raises InvalidResponseBodyError for an unparsable body. Callers that catch ValueError today would miss it, unless the new error also subclasses ValueError.

✍️ Drafted by Claude Code

Activity

  1. added this to the 3.0 milestone on Oct 7, 2026
  2. added
    t-toolingIssues with this label are in the ownership of the tooling team.
    on Oct 7, 2026
  3. modified the milestones: 3.0, 4.0 on Oct 7, 2026
  4. self-assigned this
    on Oct 8, 2026
  5. added a commit that references this issue on Oct 8, 2026
    c8f8ea2
  6. vdusek commented on Oct 8, 2026

    @vdusek
    ContributorAuthor

    resolved by #1109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions