catch errors
This commit is contained in:
parent
71c239d432
commit
288ba30a16
1 changed files with 26 additions and 16 deletions
|
|
@ -3086,6 +3086,7 @@ module.exports = async (
|
||||||
})
|
})
|
||||||
|
|
||||||
ap.post('/api/lnd/cb/:methodName', (req, res) => {
|
ap.post('/api/lnd/cb/:methodName', (req, res) => {
|
||||||
|
try {
|
||||||
const { lightning } = LightningServices.services
|
const { lightning } = LightningServices.services
|
||||||
const { methodName } = req.params
|
const { methodName } = req.params
|
||||||
const args = req.body
|
const args = req.body
|
||||||
|
|
@ -3103,5 +3104,14 @@ module.exports = async (
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} catch (err) {
|
||||||
|
logger.warn(`Error inside api cb:`)
|
||||||
|
logger.error(err)
|
||||||
|
logger.error(err.message)
|
||||||
|
|
||||||
|
return res.status(500).json({
|
||||||
|
errorMessage: err.message
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue