From 3ddbb728b46908bbda3b62470483b1686aed3863 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Thu, 11 Mar 2021 08:52:02 -0800 Subject: [PATCH] debugging --- src/routes/v4/route-utils.js | 1 + src/routes/v4/slp.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/routes/v4/route-utils.js b/src/routes/v4/route-utils.js index 9e8262f..108def4 100644 --- a/src/routes/v4/route-utils.js +++ b/src/routes/v4/route-utils.js @@ -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. diff --git a/src/routes/v4/slp.js b/src/routes/v4/slp.js index 6beec5c..5e0324c 100644 --- a/src/routes/v4/slp.js +++ b/src/routes/v4/slp.js @@ -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()',