diff options
author | Chocobozzz <me@florianbigard.com> | 2018-03-26 15:54:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-03-26 16:04:14 +0200 |
commit | d5b7d9110dd637a7f67ce9e430145314812a8df1 (patch) | |
tree | d019ef5fe68b14d7e5ad11953b6c1f4811669ce6 /server/models | |
parent | 0dcf9a14be3f8668fe5ee65cf0365d457b4d1499 (diff) | |
download | PeerTube-d5b7d9110dd637a7f67ce9e430145314812a8df1.tar.gz PeerTube-d5b7d9110dd637a7f67ce9e430145314812a8df1.tar.zst PeerTube-d5b7d9110dd637a7f67ce9e430145314812a8df1.zip |
Fix error logging
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/activitypub/actor-follow.ts | 4 | ||||
-rw-r--r-- | server/models/oauth/oauth-token.ts | 2 | ||||
-rw-r--r-- | server/models/video/video.ts | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/server/models/activitypub/actor-follow.ts b/server/models/activitypub/actor-follow.ts index d3c438626..c97f4cead 100644 --- a/server/models/activitypub/actor-follow.ts +++ b/server/models/activitypub/actor-follow.ts | |||
@@ -118,12 +118,12 @@ export class ActorFollowModel extends Model<ActorFollowModel> { | |||
118 | 118 | ||
119 | if (goodInboxes.length !== 0) { | 119 | if (goodInboxes.length !== 0) { |
120 | ActorFollowModel.incrementScores(goodInboxes, ACTOR_FOLLOW_SCORE.BONUS, t) | 120 | ActorFollowModel.incrementScores(goodInboxes, ACTOR_FOLLOW_SCORE.BONUS, t) |
121 | .catch(err => logger.error('Cannot increment scores of good actor follows.', err)) | 121 | .catch(err => logger.error('Cannot increment scores of good actor follows.', { err })) |
122 | } | 122 | } |
123 | 123 | ||
124 | if (badInboxes.length !== 0) { | 124 | if (badInboxes.length !== 0) { |
125 | ActorFollowModel.incrementScores(badInboxes, ACTOR_FOLLOW_SCORE.PENALTY, t) | 125 | ActorFollowModel.incrementScores(badInboxes, ACTOR_FOLLOW_SCORE.PENALTY, t) |
126 | .catch(err => logger.error('Cannot decrement scores of bad actor follows.', err)) | 126 | .catch(err => logger.error('Cannot decrement scores of bad actor follows.', { err })) |
127 | } | 127 | } |
128 | } | 128 | } |
129 | 129 | ||
diff --git a/server/models/oauth/oauth-token.ts b/server/models/oauth/oauth-token.ts index 528bb9587..759aa2779 100644 --- a/server/models/oauth/oauth-token.ts +++ b/server/models/oauth/oauth-token.ts | |||
@@ -125,7 +125,7 @@ export class OAuthTokenModel extends Model<OAuthTokenModel> { | |||
125 | } as OAuthTokenInfo | 125 | } as OAuthTokenInfo |
126 | }) | 126 | }) |
127 | .catch(err => { | 127 | .catch(err => { |
128 | logger.info('getRefreshToken error.', err) | 128 | logger.info('getRefreshToken error.', { err }) |
129 | throw err | 129 | throw err |
130 | }) | 130 | }) |
131 | } | 131 | } |
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index f43b73e49..13bf0b6a2 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -473,7 +473,7 @@ export class VideoModel extends Model<VideoModel> { | |||
473 | 473 | ||
474 | return Promise.all(tasks) | 474 | return Promise.all(tasks) |
475 | .catch(err => { | 475 | .catch(err => { |
476 | logger.error('Some errors when removing files of video %s in after destroy hook.', instance.uuid, err) | 476 | logger.error('Some errors when removing files of video %s in after destroy hook.', instance.uuid, { err }) |
477 | }) | 477 | }) |
478 | } | 478 | } |
479 | 479 | ||
@@ -1213,7 +1213,7 @@ export class VideoModel extends Model<VideoModel> { | |||
1213 | 1213 | ||
1214 | } catch (err) { | 1214 | } catch (err) { |
1215 | // Auto destruction... | 1215 | // Auto destruction... |
1216 | this.destroy().catch(err => logger.error('Cannot destruct video after transcoding failure.', err)) | 1216 | this.destroy().catch(err => logger.error('Cannot destruct video after transcoding failure.', { err })) |
1217 | 1217 | ||
1218 | throw err | 1218 | throw err |
1219 | } | 1219 | } |