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

Proper error handling #41

Open
arthot opened this issue Dec 7, 2020 · 1 comment
Open

Proper error handling #41

arthot opened this issue Dec 7, 2020 · 1 comment

Comments

@arthot
Copy link

arthot commented Dec 7, 2020

SDK should throw a custom error with more fields to follow API error structure https://developers.evrythng.com/docs/http-verbs-and-error-codes#error-messages

Also e2e should include negative scenario testing

@C-D-Lewis
Copy link
Contributor

It used to, but that doesn't work well with libraries and integrations that expect a native Error. So I used a misture of both - a native Error with a message you can parse as JSON. I think this is the right solution, unless you know an alternative that achieves both of these aims?

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