Fix getCpfpInfo error handling
This commit is contained in:
parent
e18f3800be
commit
329c635da5
@ -224,7 +224,12 @@ class BitcoinRoutes {
|
|||||||
} else {
|
} else {
|
||||||
let cpfpInfo;
|
let cpfpInfo;
|
||||||
if (config.DATABASE.ENABLED) {
|
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) {
|
if (cpfpInfo) {
|
||||||
res.json(cpfpInfo);
|
res.json(cpfpInfo);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user