Fix getCpfpInfo error handling

This commit is contained in:
Mononaut 2023-06-21 19:53:35 -04:00
parent e18f3800be
commit 329c635da5
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E

View File

@ -224,7 +224,12 @@ class BitcoinRoutes {
} else {
let cpfpInfo;
if (config.DATABASE.ENABLED) {
cpfpInfo = await transactionRepository.$getCpfpInfo(req.params.txId);
try {
cpfpInfo = await transactionRepository.$getCpfpInfo(req.params.txId);
} catch (e) {
res.status(500).send('failed to get CPFP info');
return;
}
}
if (cpfpInfo) {
res.json(cpfpInfo);