Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch non-JSON errors in the Go SDK #25

Open
Swimburger opened this issue Aug 15, 2024 · 0 comments
Open

Catch non-JSON errors in the Go SDK #25

Swimburger opened this issue Aug 15, 2024 · 0 comments
Assignees

Comments

@Swimburger
Copy link
Collaborator

Most errors return a JSON HTTP body that looks like this:

{
  "status": "error",
  "error": "the error message"
}

However, there are bugs in the API where it sometimes returns errors as plain text or HTML.
The Go SDK needs to be able to handle this gracefully and return the full HTTP body to the user somehow so they can debug the issue.

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

No branches or pull requests

2 participants