Support for error handling with response body?
Closed this issue · 2 comments
mkscrg commented
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 commented
To illustrate, here's a change we're playing with to get more error context: brendanhay:4592e14...wagonhq:f889ed9
brendanhay commented
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.