1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge pull request #385 from MetaMask/ImprovedLogging

Improve metamask-controller error logging
This commit is contained in:
Dan Finlay 2016-07-05 12:33:21 -07:00 committed by GitHub
commit 25598f1b6f

View File

@ -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)
}
}
}
}