-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: Use JSON.stringify for [object Object] #1181
Conversation
58fbc10
to
ceb3e75
Compare
exceptionMessage = JSON.stringify(msg); | ||
} else { | ||
exceptionMessage = '' + msg; | ||
} |
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.
Moved string convert logic before the ignore logic, so user's can ignore on custom objects
A reason why we don't do that is that when you pass a very large object, payload size can exceed 100kB which is our current limit for a single event. This will also create way too many issues in the UI, which on the other hand will create too much noise. We'll try to revisit this in the next major version. |
@kamilogorek This is very useful feature for tracking down errors. Can we just put an upper limit on the The size issue could happen with a really long error message (or stack trace) currently. The JSON.stringify errors don't have a stack trace, so there is a lot of room in the request. |
Hey @taylor-cedar, it'll be pulled down to Raven.js once we get this one working for Node - |
We got around by monkey-patching the function now, but would be nice to have it merged |
Hi, did the #416 merge into ravenjs? |
I don't believe it has yet but it would still be a good improvement we're planning to make |
Would be really great to get this functionality in |
There are several issues about
[object Object]
showing up as the exception message. Obviously people should throw Error instead of a normal JS object. I think it would be way more helpful if the JS object was JSON stringified, so you could see the actual error object.This PR changes the message -> String logic, so if it's an object, it uses
JSON.stringify
instead.