Skip to content

Rethink getRecord() parsing records by content type #1067

Open

Description

@vdusek

getRecord() parses the body by the response content type: application/json is JSON.parsed, text types are decoded to a string, anything else stays a Buffer, with buffer: true as the only way out. It came up in a review discussion on #1051: since a string stored through setRecord() under contentType: 'application/json' now goes out verbatim, a non-JSON string saved that way fails to parse on the way back.

This issue is solutioning only. Decide whether the client should keep parsing by content type, and if so in what form:

  • keep the current default and document the pitfall
  • keep parsing but return the raw body when it fails to parse
  • stop parsing by default and return the body with its content type

Compare with the Python client before choosing. Any change here is breaking.

✍️ Drafted by Claude Code

Activity

  1. added this to the 3.0 milestone on Sep 14, 2026
  2. added
    t-toolingIssues with this label are in the ownership of the tooling team.
    on Sep 14, 2026
  3. self-assigned this
    on Sep 14, 2026
  4. vdusek commented on Sep 25, 2026

    @vdusek
    ContributorAuthor

    For now, the behavior is better documented in #1082. I'm removing the v3 milestone and moving this to the icebox.

  5. removed this from the 3.0 milestone on Sep 30, 2026
  6. removed their assignment
    on Sep 30, 2026
  7. changed the title [-]Investigate whether getRecord() should keep parsing records by content type[/-] [+]Rethink getRecord() parsing records by content type[/+] on Sep 30, 2026
  8. added theissue type on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions