diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-02-05 19:02:05 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-02-05 19:02:05 +0100 |
commit | 8425cb894d4867d26fd5f7fae7862b0669f3c717 (patch) | |
tree | 5e2f00a8219e198f2dd074ca13f3ae681174228f /middlewares/reqValidators | |
parent | dac0a5319ab1c52a0958647b1593f85339b77e29 (diff) | |
download | PeerTube-8425cb894d4867d26fd5f7fae7862b0669f3c717.tar.gz PeerTube-8425cb894d4867d26fd5f7fae7862b0669f3c717.tar.zst PeerTube-8425cb894d4867d26fd5f7fae7862b0669f3c717.zip |
Error handling mini refractoring
Diffstat (limited to 'middlewares/reqValidators')
-rw-r--r-- | middlewares/reqValidators/pods.js | 5 |
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 |