diff options
| author | Adam Soltys <[email protected]> | 2021-07-08 15:15:14 -0400 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-07-08 15:15:14 -0400 |
| commit | 556b133ffbd4591b49626c821d7602e09e97a1f2 (patch) | |
| tree | 628f6776da761d865ee1e9ea068ca9ef60d3ec2f /routes/send.js | |
| parent | 8a554b6d3085efc3e4b062bdb0ac61cc0ce89416 (diff) | |
| download | coinos-server-556b133ffbd4591b49626c821d7602e09e97a1f2.tar.gz coinos-server-556b133ffbd4591b49626c821d7602e09e97a1f2.zip | |
throw instead of returning to abort db transaction
Diffstat (limited to 'routes/send.js')
| -rw-r--r-- | routes/send.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/send.js b/routes/send.js index 579e70b4..3aec9fb6 100644 --- a/routes/send.js +++ b/routes/send.js @@ -45,7 +45,7 @@ module.exports = ah(async (req, res, next) => { }; if (!username) { - return res.status(500).send("Vouchers temporarily disabled"); + throw new Error("Vouchers temporarily disabled"); l.info("creating redeemable payment"); params.redeemcode = uuidv4(); params.hash = `${req.get("origin")}/redeem/${params.redeemcode}`; |
