Don't send invalid data and parse more stack traces.#11
Don't send invalid data and parse more stack traces.#11hesselink wants to merge 5 commits intoSquareSquash:masterfrom
Conversation
The Squash server does validation and crashes if the fields don't validate. This way we at least get some data in the system.
The Squash server doesn't allow this; this way, we get some data in the system.
The Squash server doesn't allow occurrences without any backtrace lines. This way we get at least some data.
There was a problem hiding this comment.
It's your intention to send fake backtraces to Squash? I would either be of the opinion that a) we should not send an exception if we can't determine the stack trace, or b) we should use a custom type indicating the situation so that Squash doesn't process and display a file named "fake", but instead properly displays the situation (no backtrace could be determined).
There was a problem hiding this comment.
Yes, I want to send a 'fake' backtrace, since there is still useful info in the top level error object, and I'm also attaching useful user data (like the unparsed backtrace, since there's so many bugs in the client side parsing). I'm also fine with allowing errors without backtraces: I ran into the same problem when writing a Haskell client. I'm not the biggest Ruby hero though, and Rails, well, that's another thing entirely.
This pull requests includes two sets of changes. The first makes sure the data sent to the squash backend is always valid. Previously the javascript client could send data the wasn't accepted by the backend, causing failed requests and errors that were not reported.
The second allows tracekit to parse stack traces from javascript served from https urls.
I've made it one pull request; let me know if you prefer two separate ones.