csnover / TraceKit

Attempts to create stack traces for unhandled JavaScript exceptions in all major browsers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extremely long delays on errors with a long message

rgehan opened this issue · comments

I'm using mobx-state-tree, which generates very long error messages, when trying to instantiate a model with data that doesn't match the defined schema.

It appends a full dump of the the data to the message, among other things.

I've seen it generate a 300kB message from a 10kB JSON payload.

The issue seems to originate from a RegExp which is ran on each line of the stacktrace (which includes the message).

Couldn't we remove the "message" from the "stacktrace" so as to only keep the actual stack trace part of it?

This is a naive suggestion, as I don't know all the possible formats or use cases.

Like running the regexp on stack.slice(ex.message.length)

can you submit apr for this?