debugging

This commit is contained in:
Chris Troutner
2021-03-11 08:52:02 -08:00
parent ef49b85495
commit 3ddbb728b4
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -118,6 +118,7 @@ function getAxiosOptions () {
// If there is a failure, obj.msg is false.
function decodeError (err) {
try {
console.log('ping10')
console.log(`JSON of error: ${JSON.stringify(err, null, 2)}`)
// Attempt to extract the full node error message.
+7
View File
@@ -104,6 +104,8 @@ class Slp {
// DRY error handler.
errorHandler (err, res) {
console.error('Entering slp.js/errorHandler(). err: ', err)
// Attempt to decode the error message.
const { msg, status } = _this.routeUtils.decodeError(err)
if (msg) {
@@ -2050,9 +2052,12 @@ class Slp {
res.status(200)
return res.json({ slpUtxos: utxos })
} catch (err) {
console.log('ping01')
wlogger.error('Error in slp.js/hydrateUtxos().', err)
console.error('Error in slp.js/hydrateUtxos().', err)
console.log('ping02')
// Decode the error message.
const { msg, status } = routeUtils.decodeError(err)
console.log('msg: ', msg)
@@ -2062,6 +2067,8 @@ class Slp {
return res.json({ error: msg, message: msg, success: false })
}
console.log('ping03')
res.status(500)
return res.json({
error: 'Undetermined error in hydrateUtxos()',