mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-21 16:52:04 -07:00
debugging
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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()',
|
||||
|
||||
Reference in New Issue
Block a user