-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Re-think Error Design #63
Comments
One thing I've run into which trolled me hard for a while was I was throwing custom errors from our overridden Does it make more sense to pass errors through as-is in this library and leave it up to the consumer's error handling/logging to do what it needs to do? |
I think this is the best thing to do - and lines up with exposing primitives task |
Axios library returns
err.response
,err.request
anderr.config
, which are very fat and make stdout impossible to read. Need to figure out if we have to return some of these values to the user or not. And if so, we have to define the output + design.The v2 JSON API returns this on error:
SDK deserializes these fields into:
This is cool. But if you get a library error, the error looks like:
Error is different. This is hard to document & hard to work with.
Need to figure out what todo.
The text was updated successfully, but these errors were encountered: