Improved logging

master
Keith Irwin 2021-12-26 15:58:13 -07:00
parent d96372ca11
commit 54915172bb
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
1 changed files with 2 additions and 2 deletions

View File

@ -50,15 +50,15 @@ app.post('/', async (req, res) => {
text: req.body['msg'],
})
} catch (err) {
return res.sendStatus(500)
console.error(err)
return res.sendStatus(500)
}
console.log(`Sent email ${mail_res.messageId}`)
return res.sendStatus(200)
// hcaptcha failed
} else {
console.log(`Failed hCaptcha with data: ${JSON.stringify(data)}`)
console.log(`Failed hCaptcha with errors: ${data.error-codes}`)
return res.sendStatus(403)
}
})