aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-13 10:17:47 +0200
committerChocobozzz <me@florianbigard.com>2022-07-13 10:17:47 +0200
commit14f7ad399fddd00362eabdf8d32e453ebc8be453 (patch)
tree517433d5787291a359bcd4db7ab9c27b0265ee7f /server
parent3b0525106d8742b5ebd6962219eaf105435f6fb9 (diff)
downloadPeerTube-14f7ad399fddd00362eabdf8d32e453ebc8be453.tar.gz
PeerTube-14f7ad399fddd00362eabdf8d32e453ebc8be453.tar.zst
PeerTube-14f7ad399fddd00362eabdf8d32e453ebc8be453.zip
Add more error logs
Diffstat (limited to 'server')
-rw-r--r--server/lib/activitypub/videos/get.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/lib/activitypub/videos/get.ts b/server/lib/activitypub/videos/get.ts
index d7500c71a..b74df132c 100644
--- a/server/lib/activitypub/videos/get.ts
+++ b/server/lib/activitypub/videos/get.ts
@@ -1,4 +1,5 @@
1import { retryTransactionWrapper } from '@server/helpers/database-utils' 1import { retryTransactionWrapper } from '@server/helpers/database-utils'
2import { logger } from '@server/helpers/logger'
2import { JobQueue } from '@server/lib/job-queue' 3import { JobQueue } from '@server/lib/job-queue'
3import { loadVideoByUrl, VideoLoadByUrlType } from '@server/lib/model-loaders' 4import { loadVideoByUrl, VideoLoadByUrlType } from '@server/lib/model-loaders'
4import { MVideoAccountLightBlacklistAllFiles, MVideoImmutable, MVideoThumbnail } from '@server/types/models' 5import { MVideoAccountLightBlacklistAllFiles, MVideoImmutable, MVideoThumbnail } from '@server/types/models'
@@ -77,6 +78,8 @@ async function getOrCreateAPVideo (
77 if (err.name === 'SequelizeUniqueConstraintError') { 78 if (err.name === 'SequelizeUniqueConstraintError') {
78 const alreadyCreatedVideo = await loadVideoByUrl(videoUrl, fetchType) 79 const alreadyCreatedVideo = await loadVideoByUrl(videoUrl, fetchType)
79 if (alreadyCreatedVideo) return { video: alreadyCreatedVideo, created: false } 80 if (alreadyCreatedVideo) return { video: alreadyCreatedVideo, created: false }
81
82 logger.error('Cannot create video %s because of SequelizeUniqueConstraintError error, but cannot find it in database.', videoUrl)
80 } 83 }
81 84
82 throw err 85 throw err