Improved logging
parent
d96372ca11
commit
54915172bb
4
index.js
4
index.js
|
@ -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)
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue