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
It's a node-ism that the first parameter in a callback is an error, but it's also a nodeism that the first parameter is an instanceof Error. This allows user callback code to assume a standard API -- things like error.stack, error.message -- for actions like logging, analytics, etc.
It's a node-ism that the first parameter in a callback is an error, but it's also a nodeism that the first parameter is an instanceof Error. This allows user callback code to assume a standard API -- things like
error.stack
,error.message
-- for actions like logging, analytics, etc.https://github.com/robrighter/node-recurly/blob/master/lib/client.js#L86 is one instance where node-recurly does not pass Errors to the user callback for the error parameter, breaking any user code that assumes a standard Error api.
_wrap_response()
can still set the .statusCode and .headers on the Error object, but it should return an instanceof Error if it's wrapping an error.The text was updated successfully, but these errors were encountered: