Skip to content

Commit

Permalink
Revert "core(driver): stringify protocol error messages (#6302)" (#6328)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Oct 17, 2018
1 parent c92142f commit 1e3ef60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lighthouse-core/lib/lh-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class LighthouseError extends Error {
}

// otherwise fallback to building a generic Error
let errMsg = `(${method}): ${JSON.stringify(protocolError.message)}`;
if (protocolError.data) errMsg += ` (${JSON.stringify(protocolError.data)})`;
let errMsg = `(${method}): ${protocolError.message}`;
if (protocolError.data) errMsg += ` (${protocolError.data})`;
const error = new Error(`Protocol error ${errMsg}`);
return Object.assign(error, {protocolMethod: method, protocolError: protocolError.message});
}
Expand Down

0 comments on commit 1e3ef60

Please sign in to comment.