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'],
|
text: req.body['msg'],
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return res.sendStatus(500)
|
|
||||||
console.error(err)
|
console.error(err)
|
||||||
|
return res.sendStatus(500)
|
||||||
}
|
}
|
||||||
console.log(`Sent email ${mail_res.messageId}`)
|
console.log(`Sent email ${mail_res.messageId}`)
|
||||||
return res.sendStatus(200)
|
return res.sendStatus(200)
|
||||||
|
|
||||||
// hcaptcha failed
|
// hcaptcha failed
|
||||||
} else {
|
} else {
|
||||||
console.log(`Failed hCaptcha with data: ${JSON.stringify(data)}`)
|
console.log(`Failed hCaptcha with errors: ${data.error-codes}`)
|
||||||
return res.sendStatus(403)
|
return res.sendStatus(403)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue