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

Support for error handling with response body? #18

Closed
mkscrg opened this issue Apr 14, 2016 · 2 comments
Closed

Support for error handling with response body? #18

mkscrg opened this issue Apr 14, 2016 · 2 comments

Comments

@mkscrg
Copy link

mkscrg commented Apr 14, 2016

gogol doesn't offer much context for API errors right now, since it uses checkStatus to throw ServiceError on non-success response statuses. (And checkStatus doesn't have access to the response body.)

Is this intentional, or a planned change in the future? It's hard to work with these APIs without any error context beyond the raw status code.

These libraries (amazonka etc) are amazing btw 👍😀🔧

@mkscrg
Copy link
Author

mkscrg commented Apr 14, 2016

To illustrate, here's a change we're playing with to get more error context: brendanhay:4592e14...wagonhq:f889ed9

@brendanhay
Copy link
Owner

Definitely open to improving anything that makes your lives easier. If you don't mind, I'll lift most of your code and integrate it.

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