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

Cradle does not return real errors #216

Closed
jfhbrook opened this issue May 19, 2013 · 2 comments
Closed

Cradle does not return real errors #216

jfhbrook opened this issue May 19, 2013 · 2 comments

Comments

@jfhbrook
Copy link
Contributor

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

:'(

@indexzero
Copy link
Member

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.

@frolic
Copy link
Contributor

frolic commented Nov 29, 2013

👍

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

No branches or pull requests

3 participants