From ceb6fbb7a8fbe6125d16cddc1b00f1e9a95b7887 Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Wed, 17 Oct 2018 13:42:37 -0700 Subject: [PATCH] Revert "core(driver): stringify protocol error messages (#6302)" This reverts commit c92142f9766bd13675c89003699175de52eb95bc. --- lighthouse-core/lib/lh-error.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lighthouse-core/lib/lh-error.js b/lighthouse-core/lib/lh-error.js index e392c6f08576..557fcc746d53 100644 --- a/lighthouse-core/lib/lh-error.js +++ b/lighthouse-core/lib/lh-error.js @@ -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}); }