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

Improve error handling #103

Open
mrodem opened this issue Nov 13, 2017 · 0 comments
Open

Improve error handling #103

mrodem opened this issue Nov 13, 2017 · 0 comments

Comments

@mrodem
Copy link
Contributor

mrodem commented Nov 13, 2017

In adapter.js, there is a _makeError function that creates instances of a custom Error class. According to the JSDoc, this function accepts two parameters; userMessage and description which should both be string. However, the description is sometimes given as a string and sometimes as an error object.

The custom Error class should ideally be named something other than Error. Then it can be instantiated directly without needing the intermediate _makeError function. Also, the use of the description parameter should be changed so that it is consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants