-
Notifications
You must be signed in to change notification settings - Fork 42
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
Document error handling #225
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it useful to identify errors by source in catch clauses. One common solution is to emit subclasses of
Error
. Another is to fill an identifying field on the error object. Either way, the chosen option should be a documented part of the client's interface.node-sparkpost
currently produces error instances witherror.name === 'SparkPostError
.A few options:
[ ] - Publish the
.name === SparkPostError
for error filtering.[ ] - Subclass
Error
to create aSparkPostError
type.We could also do both...
The text was updated successfully, but these errors were encountered: