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

Improve handling for remote error parsing failures. #10

Open
aabizri opened this issue May 10, 2017 · 0 comments
Open

Improve handling for remote error parsing failures. #10

aabizri opened this issue May 10, 2017 · 0 comments
Assignees
Milestone

Comments

@aabizri
Copy link
Collaborator

aabizri commented May 10, 2017

The problem

Currently, when we try to parse a remote error, and its not a valid JSON payload, (such as some undefined errors and path errors) we return an error that is not a RemoteError, which also means that the specifics (status code & plain-text message) gets lost as well.

One solution

Add the ability to RemoteError to note what was the plain-text response in case the unmarshalling fails, such as a Plain []byte field noting the contents, an ID made on the fly, and correct RemoteError.Error handling.

@aabizri aabizri added this to the v1 release milestone May 10, 2017
@aabizri aabizri self-assigned this May 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant