aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-03-26 15:54:13 +0200
committerChocobozzz <me@florianbigard.com>2018-03-26 16:04:14 +0200
commitd5b7d9110dd637a7f67ce9e430145314812a8df1 (patch)
treed019ef5fe68b14d7e5ad11953b6c1f4811669ce6 /server/middlewares
parent0dcf9a14be3f8668fe5ee65cf0365d457b4d1499 (diff)
downloadPeerTube-d5b7d9110dd637a7f67ce9e430145314812a8df1.tar.gz
PeerTube-d5b7d9110dd637a7f67ce9e430145314812a8df1.tar.zst
PeerTube-d5b7d9110dd637a7f67ce9e430145314812a8df1.zip
Fix error logging
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/activitypub.ts2
-rw-r--r--server/middlewares/validators/videos.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/activitypub.ts b/server/middlewares/activitypub.ts
index 1488b42ab..12d5c22c5 100644
--- a/server/middlewares/activitypub.ts
+++ b/server/middlewares/activitypub.ts
@@ -18,7 +18,7 @@ async function checkSignature (req: Request, res: Response, next: NextFunction)
18 try { 18 try {
19 actor = await getOrCreateActorAndServerAndModel(creator) 19 actor = await getOrCreateActorAndServerAndModel(creator)
20 } catch (err) { 20 } catch (err) {
21 logger.error('Cannot create remote actor and check signature.', err) 21 logger.error('Cannot create remote actor and check signature.', { err })
22 return res.sendStatus(403) 22 return res.sendStatus(403)
23 } 23 }
24 24
diff --git a/server/middlewares/validators/videos.ts b/server/middlewares/validators/videos.ts
index 1dc8429c8..e3543ef93 100644
--- a/server/middlewares/validators/videos.ts
+++ b/server/middlewares/validators/videos.ts
@@ -86,7 +86,7 @@ const videosAddValidator = [
86 try { 86 try {
87 duration = await getDurationFromVideoFile(videoFile.path) 87 duration = await getDurationFromVideoFile(videoFile.path)
88 } catch (err) { 88 } catch (err) {
89 logger.error('Invalid input file in videosAddValidator.', err) 89 logger.error('Invalid input file in videosAddValidator.', { err })
90 res.status(400) 90 res.status(400)
91 .json({ error: 'Invalid input file.' }) 91 .json({ error: 'Invalid input file.' })
92 .end() 92 .end()