From 1d8d7d833df3c2b398efdf067df84ffd41f27e49 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 5 Jul 2016 09:06:33 -0700 Subject: Improve metamask-controller error logging Fixes #384 --- app/scripts/metamask-controller.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 470591323..f2f69bc8c 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -89,10 +89,13 @@ module.exports = class MetamaskController { }) function logger (err, request, response) { - if (err) return console.error(err.stack) + if (err) return console.error(err) if (!request.isMetamaskInternal) { console.log(`RPC (${originDomain}):`, request, '->', response) - if (response.error) console.error('Error in RPC response:\n' + response.error.message) + if (response.error) { + console.error('Error in RPC response:\n') + console.error(response.error) + } } } } -- cgit v1.2.3 From c0b0c9c0289296d3fb280fa760e723419275e8a6 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 5 Jul 2016 09:51:33 -0700 Subject: Simplify error log --- app/scripts/metamask-controller.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app') diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index f2f69bc8c..8a5ffb75a 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -93,8 +93,7 @@ module.exports = class MetamaskController { if (!request.isMetamaskInternal) { console.log(`RPC (${originDomain}):`, request, '->', response) if (response.error) { - console.error('Error in RPC response:\n') - console.error(response.error) + console.error('Error in RPC response:\n', response.error) } } } -- cgit v1.2.3