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

Errors all returned as 'unknown' #10

Open
bitmage opened this issue Jun 29, 2016 · 0 comments
Open

Errors all returned as 'unknown' #10

bitmage opened this issue Jun 29, 2016 · 0 comments

Comments

@bitmage
Copy link

bitmage commented Jun 29, 2016

When wrapping errors, we are passing the error property, which ERARO doesn't do anything with. As a result any of the errors coming from this library have 'unknown' in their message body.

I resolved this locally by removing all usage of the ERARO library and just calling the standard callbacks with any errors we receive. e.g:

if (err) {return done(err)}

This seems to work splendidly. The seneca code receiving the callback values already wraps them with ERARO, and it already logs errors if necessary. So we can cut out code like this too:

seneca.log.error({code: 'save', tag: args.tag$, store: store.name, query: query, error: err})

Does this seem right? I'll submit a pull request if so.

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

1 participant