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

sdk should throw errors instead of strings #4

Open
remorses opened this issue Apr 20, 2023 · 0 comments · May be fixed by #5
Open

sdk should throw errors instead of strings #4

remorses opened this issue Apr 20, 2023 · 0 comments · May be fixed by #5

Comments

@remorses
Copy link

it is good practice to throw Error objects instead of strings, this way you can trace where the error comes from

throw `server error: status code ${err.response.status}`

This line should be replaced with throw new Error('error message')

@remorses remorses linked a pull request Apr 20, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant