diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-07-07 18:26:12 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-07-07 18:26:12 +0200 |
commit | ad0997adfb9e1e3b1ff54338d7558cf7b18440ea (patch) | |
tree | 78ef53699d260e194bbcda7eccb645a14070679a /server/middlewares/validators/videos.ts | |
parent | 709756b8e183f67ef9bf8f7bc149af4736260350 (diff) | |
download | PeerTube-ad0997adfb9e1e3b1ff54338d7558cf7b18440ea.tar.gz PeerTube-ad0997adfb9e1e3b1ff54338d7558cf7b18440ea.tar.zst PeerTube-ad0997adfb9e1e3b1ff54338d7558cf7b18440ea.zip |
Fix error logging
Diffstat (limited to 'server/middlewares/validators/videos.ts')
-rw-r--r-- | server/middlewares/validators/videos.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/middlewares/validators/videos.ts b/server/middlewares/validators/videos.ts index ec452cade..013466487 100644 --- a/server/middlewares/validators/videos.ts +++ b/server/middlewares/validators/videos.ts | |||
@@ -33,7 +33,7 @@ function videosAddValidator (req: express.Request, res: express.Response, next: | |||
33 | next() | 33 | next() |
34 | }) | 34 | }) |
35 | .catch(err => { | 35 | .catch(err => { |
36 | logger.error('Error in getting duration from file.', { error: err }) | 36 | logger.error('Error in getting duration from file.', err) |
37 | res.status(400).send('Cannot retrieve metadata of the file.') | 37 | res.status(400).send('Cannot retrieve metadata of the file.') |
38 | }) | 38 | }) |
39 | }) | 39 | }) |
@@ -164,7 +164,7 @@ function checkVideoExists (id: string, res: express.Response, callback: () => vo | |||
164 | callback() | 164 | callback() |
165 | }) | 165 | }) |
166 | .catch(err => { | 166 | .catch(err => { |
167 | logger.error('Error in video request validator.', { error: err }) | 167 | logger.error('Error in video request validator.', err) |
168 | return res.sendStatus(500) | 168 | return res.sendStatus(500) |
169 | }) | 169 | }) |
170 | } | 170 | } |
@@ -190,7 +190,7 @@ function checkUserCanDeleteVideo (userId: number, res: express.Response, callbac | |||
190 | callback() | 190 | callback() |
191 | }) | 191 | }) |
192 | .catch(err => { | 192 | .catch(err => { |
193 | logger.error('Error in video request validator.', { error: err }) | 193 | logger.error('Error in video request validator.', err) |
194 | return res.sendStatus(500) | 194 | return res.sendStatus(500) |
195 | }) | 195 | }) |
196 | } | 196 | } |