Skip to content

Raise UnexpectedResponseError for arrays of non-object elements - #28

Merged
kylekeesling merged 1 commit into
masterfrom
raise-on-non-hash-collection-elements
Jul 9, 2026
Merged

Raise UnexpectedResponseError for arrays of non-object elements#28
kylekeesling merged 1 commit into
masterfrom
raise-on-non-hash-collection-elements

Conversation

@kylekeesling

@kylekeesling kylekeesling commented Jul 9, 2026

Copy link
Copy Markdown
Member

The alternate endpoint's dailyusage currently returns a bare array of
floats; Collection.from_response built records from them and crashed with
an opaque 'undefined method transform_keys for Float' (PASS-TOOLS-7M).
Reject non-hash elements with the same diagnosable UnexpectedResponseError
used for non-JSON bodies.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

The alternate endpoint's dailyusage currently returns a bare array of
floats; Collection.from_response built records from them and crashed with
an opaque 'undefined method transform_keys for Float' (PASS-TOOLS-7M).
Reject non-hash elements with the same diagnosable UnexpectedResponseError
used for non-JSON bodies.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kylekeesling
kylekeesling merged commit a7e8933 into master Jul 9, 2026
5 checks passed
@kylekeesling
kylekeesling deleted the raise-on-non-hash-collection-elements branch July 9, 2026 12:15
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