Merge pull request #385 from MetaMask/ImprovedLogging

Improve metamask-controller error logging
feature/default_network_editable
Dan Finlay 8 years ago committed by GitHub
commit 25598f1b6f
  1. 6
      app/scripts/metamask-controller.js

@ -89,10 +89,12 @@ 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', response.error)
}
}
}
}

Loading…
Cancel
Save