1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00

Improve metamask-controller error logging

Fixes #384
This commit is contained in:
Dan Finlay 2016-07-05 09:06:33 -07:00
parent 76c473538a
commit 1d8d7d833d

View File

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