catch all errors

This commit is contained in:
Daniel Lugo 2020-03-10 15:47:45 -04:00
parent ed0d88f9ed
commit 529454bd08

View file

@ -640,6 +640,7 @@ module.exports = async (
});
app.post("/api/lnd/wallet/existing", async (req, res) => {
try {
const { password, alias } = req.body;
const healthResponse = await checkHealth();
const exists = await walletExists();
@ -700,6 +701,11 @@ module.exports = async (
publicKey
}
})
} catch (err) {
return res.status(500).json({
errorMessage: err.message,
})
}
});
// get lnd info