diff options
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/activitypub/videos/get.ts | 3 |
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 @@ | |||
1 | import { retryTransactionWrapper } from '@server/helpers/database-utils' | 1 | import { retryTransactionWrapper } from '@server/helpers/database-utils' |
2 | import { logger } from '@server/helpers/logger' | ||
2 | import { JobQueue } from '@server/lib/job-queue' | 3 | import { JobQueue } from '@server/lib/job-queue' |
3 | import { loadVideoByUrl, VideoLoadByUrlType } from '@server/lib/model-loaders' | 4 | import { loadVideoByUrl, VideoLoadByUrlType } from '@server/lib/model-loaders' |
4 | import { MVideoAccountLightBlacklistAllFiles, MVideoImmutable, MVideoThumbnail } from '@server/types/models' | 5 | import { 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 |