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
Fix errors #7
Fix errors #7
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, but i'm confused. I assumed we purposefully swallowed error details just like hapi & paperplane?
@@ -1,10 +1,8 @@ | |||
language: node_js | |||
node_js: | |||
- '8' | |||
- '7' | |||
- '6' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we locking sox
to node 8 just for boom?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I double-checked our repos, and we don't use sox
in anything less than node 8, so I figured it was safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
@mgreystone, looking back at the client-side portion of const toError = ({ data, message, name, status }) => {
const err = new Error(message)
err.data = data
err.name = name
err.status = status
return err
} We already treat |
In the past,
sox
has been less than helpful auto-wrapping vanilla errors withBoom
representations. They all just ended up as 500's, and the original message was lost in time and space.Now we can surface those custom error messages. You'll still get a 500, but the
message
property should be helpful.to test: