You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 with error.name === 'SparkPostError.
A few options:
[ ] - Publish the .name === SparkPostError for error filtering.
[ ] - Subclass Error to create a SparkPostError type.
We could also do both...
The text was updated successfully, but these errors were encountered:
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: