From 14f7ad399fddd00362eabdf8d32e453ebc8be453 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 13 Jul 2022 10:17:47 +0200 Subject: Add more error logs --- server/lib/activitypub/videos/get.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'server') 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 @@ import { retryTransactionWrapper } from '@server/helpers/database-utils' +import { logger } from '@server/helpers/logger' import { JobQueue } from '@server/lib/job-queue' import { loadVideoByUrl, VideoLoadByUrlType } from '@server/lib/model-loaders' import { MVideoAccountLightBlacklistAllFiles, MVideoImmutable, MVideoThumbnail } from '@server/types/models' @@ -77,6 +78,8 @@ async function getOrCreateAPVideo ( if (err.name === 'SequelizeUniqueConstraintError') { const alreadyCreatedVideo = await loadVideoByUrl(videoUrl, fetchType) if (alreadyCreatedVideo) return { video: alreadyCreatedVideo, created: false } + + logger.error('Cannot create video %s because of SequelizeUniqueConstraintError error, but cannot find it in database.', videoUrl) } throw err -- cgit v1.2.3