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

Implement custom errors #859

Closed
callmehiphop opened this issue Sep 11, 2015 · 3 comments
Closed

Implement custom errors #859

callmehiphop opened this issue Sep 11, 2015 · 3 comments
Assignees
Labels

Comments

@callmehiphop
Copy link
Contributor

Related to #857 (comment)

It would be nice to have custom error types in certain places to improve the error messages we provide to the user - instructing the user to access non standard properties to get the full error message seems painful, IMO errors should be obvious and in the users face.

@stephenplusplus
Copy link
Contributor

That's a wrapped error. We don't know what the underlying error is, so instead of giving them something potentially cryptic, we wrap it to at least let the user know what failed. How could a custom error type solve that?

@callmehiphop
Copy link
Contributor Author

I think if the error name was descriptive enough then the user should be able to deduce what happened without having to access additional properties for more info.

e.g.

SigningError: Cryptic error message

vs.

Error: Signing failed, see error property for more info
err.error // => Cryptic error message

@stephenplusplus
Copy link
Contributor

I'd have to say, that makes a lot of sense!

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

No branches or pull requests

2 participants