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
To me, it's very important that my javascript APIs give me real errors (meaning instanceof Error), and not strings or plain objects. Cradle is an offender in that it returns vanilla objects:
db.get('I don\'t exist', function (err) { console.log(err instanceof Error ? 'is a real error' : 'is just an object') });
undefined
> is just an object
:'(
The text was updated successfully, but these errors were encountered:
Yeah, I'm with you 100% on this. Personally I think we should use something like errs because the status property and other metadata are pretty common throughout the codebase.
To me, it's very important that my javascript APIs give me real errors (meaning instanceof Error), and not strings or plain objects. Cradle is an offender in that it returns vanilla objects:
:'(
The text was updated successfully, but these errors were encountered: