aboutsummaryrefslogtreecommitdiffhomepage
path: root/middlewares
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-02-05 19:02:05 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-02-05 19:02:05 +0100
commit8425cb894d4867d26fd5f7fae7862b0669f3c717 (patch)
tree5e2f00a8219e198f2dd074ca13f3ae681174228f /middlewares
parentdac0a5319ab1c52a0958647b1593f85339b77e29 (diff)
downloadPeerTube-8425cb894d4867d26fd5f7fae7862b0669f3c717.tar.gz
PeerTube-8425cb894d4867d26fd5f7fae7862b0669f3c717.tar.zst
PeerTube-8425cb894d4867d26fd5f7fae7862b0669f3c717.zip
Error handling mini refractoring
Diffstat (limited to 'middlewares')
-rw-r--r--middlewares/reqValidators/pods.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/middlewares/reqValidators/pods.js b/middlewares/reqValidators/pods.js
index 499cafd8f..4d649b486 100644
--- a/middlewares/reqValidators/pods.js
+++ b/middlewares/reqValidators/pods.js
@@ -12,7 +12,10 @@
12 12
13 function makeFriends (req, res, next) { 13 function makeFriends (req, res, next) {
14 friends.hasFriends(function (err, has_friends) { 14 friends.hasFriends(function (err, has_friends) {
15 if (err) return next(err) 15 if (err) {
16 logger.error('Cannot know if we have friends.', { error: err })
17 res.sendStatus(500)
18 }
16 19
17 if (has_friends === true) { 20 if (has_friends === true) {
18 // We need to quit our friends before make new ones 21 // We need to quit our friends before make new ones