- return next()
- }
-
- logger.error('Signature is not okay in body for %s.', req.body.signature.host)
- return res.sendStatus(403)
- })
+ logger.error('Signature is not okay in body for %s.', req.body.signature.host)
+ return res.sendStatus(403)
+ })
+ .catch(err => {
+ logger.error('Cannot get signed host in body.', { error: err })
+ return res.sendStatus(500)
+ })