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:
commit
25598f1b6f
@ -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…
Reference in New Issue
Block a user