feat(error handling): update to error handling to pass more information

This commit is contained in:
Chris Troutner
2021-01-10 15:13:33 -08:00
parent 89c6d48dfd
commit 9a8886121d
4 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ class Electrum {
const { msg, status } = _this.routeUtils.decodeError(err)
if (msg) {
res.status(status)
return res.json({ error: msg })
return res.json({ success: false, error: msg })
}
// Handle error patterns specific to this route.
+1 -1
View File
@@ -45,7 +45,7 @@ class Encryption {
const { msg, status } = _this.routeUtils.decodeError(err)
if (msg) {
res.status(status)
return res.json({ error: msg })
return res.json({ success: false, error: msg })
}
// Handle error patterns specific to this route.
+1 -1
View File
@@ -2003,7 +2003,7 @@ class Slp {
console.log('status: ', status)
if (msg) {
res.status(status)
return res.json({ error: msg })
return res.json({ error: msg, message: msg, success: false })
}
res.status(500)