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

Save additional error properties to extra under the error type #684

Closed
nicolezhu opened this issue Aug 11, 2016 · 3 comments
Closed

Save additional error properties to extra under the error type #684

nicolezhu opened this issue Aug 11, 2016 · 3 comments

Comments

@nicolezhu
Copy link

I'm currently saving error properties under the extra portion of the error type manually, however it would be convenient if this was supported in raven-js the same way it is done in raven-node:

https://github.com/getsentry/raven-node/blob/master/lib/parsers.js#L30-L39

@benvinegar
Copy link
Contributor

Wow, I didn't even realize raven-node did that. Hmm ... yeah, I think we can make the same change.

@robertsami
Copy link

robertsami commented Nov 22, 2016

Some more motivation from my end -- there are a few places in our codebase where we throw new Error('msg for sentry') with the intention that this will both notify the user that something went wrong as well as log the message and stack trace to sentry.

Cases where we hard error tend to be the most unexpected, so Ideally we could add some extra data to the sentry logs. EG in a default branch of a switch statement, if that branch was unexpected, we would like to hard error and attach the data that we were not expecting as well as any other surrounding useful context.

Even if in most the extra param is simple, stringify-ing them in the error message is not ideal since then the errors would not de-dupe.

@benvinegar
Copy link
Contributor

Please see conversation in #483 – totally missed this issue earlier, sorry.

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