Skip to content

Fail with a readable error when the API sends back something that is not JSON - #194

Merged
joetannenbaum merged 1 commit into
mainfrom
fix-unreadable-api-response
Aug 18, 2026
Merged

Fail with a readable error when the API sends back something that is not JSON#194
joetannenbaum merged 1 commit into
mainfrom
fix-unreadable-api-response

Conversation

@joetannenbaum

Copy link
Copy Markdown
Collaborator

Successful responses are now checked for a parseable body before anything tries to decode them. If the body is not JSON, the command exits with the status, the endpoint, and the start of what came back, instead of an unhandled JsonException and a stack trace.

Responses the API already treats as failures are left alone, so 4xx and 5xx handling is unchanged.

Fixes #162

@joetannenbaum
joetannenbaum merged commit 16b355f into main Aug 18, 2026
6 checks passed
@Jamesking56

Copy link
Copy Markdown

Thank you @joetannenbaum 🙏🏻

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.

Bug: Syntax Error after choosing region using cloud ship

2 participants