fix(page): Don't report clientside error with a node stack attached (#2572)

This patch stops reporting node.js stacks as part of `pageerror` event.
This commit is contained in:
Paul Irish 2018-05-25 16:44:25 -07:00 committed by Andrey Lushnikov
parent 17bc6515de
commit 6a0627a411

View File

@ -461,7 +461,9 @@ class Page extends EventEmitter {
*/
_handleException(exceptionDetails) {
const message = helper.getExceptionMessage(exceptionDetails);
this.emit(Page.Events.PageError, new Error(message));
const err = new Error(message);
err.stack = ''; // Don't report clientside error with a node stack attached
this.emit(Page.Events.PageError, err);
}
async _onConsoleAPI(event) {