aboutsummaryrefslogtreecommitdiffhomepage
path: root/controllers/api/v1/videos.js
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 /controllers/api/v1/videos.js
parentdac0a5319ab1c52a0958647b1593f85339b77e29 (diff)
downloadPeerTube-8425cb894d4867d26fd5f7fae7862b0669f3c717.tar.gz
PeerTube-8425cb894d4867d26fd5f7fae7862b0669f3c717.tar.zst
PeerTube-8425cb894d4867d26fd5f7fae7862b0669f3c717.zip
Error handling mini refractoring
Diffstat (limited to 'controllers/api/v1/videos.js')
-rw-r--r--controllers/api/v1/videos.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/controllers/api/v1/videos.js b/controllers/api/v1/videos.js
index 7792059ca..eec95c801 100644
--- a/controllers/api/v1/videos.js
+++ b/controllers/api/v1/videos.js
@@ -56,7 +56,7 @@
56 56
57 videos.seed(video_file.path, function (err, torrent) { 57 videos.seed(video_file.path, function (err, torrent) {
58 if (err) { 58 if (err) {
59 logger.error('Cannot seed this video.', { error: err }) 59 logger.error('Cannot seed this video.')
60 return next(err) 60 return next(err)
61 } 61 }
62 62
@@ -70,7 +70,7 @@
70 Videos.add(video_data, function (err) { 70 Videos.add(video_data, function (err) {
71 if (err) { 71 if (err) {
72 // TODO unseed the video 72 // TODO unseed the video
73 logger.error('Cannot insert this video in the database.', { error: err }) 73 logger.error('Cannot insert this video in the database.')
74 return next(err) 74 return next(err)
75 } 75 }
76 76