ezqms-449: wrap initial collaborator content loading with try-catch (#4256)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev 2023-12-25 13:03:31 +07:00 committed by GitHub
parent 6cc84f0a7f
commit e65783bfd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,12 @@ export class StorageExtension implements Extension {
minioDocument = await this.getMinioDocument(documentId, token)
} catch (err: any) {
if (initialContentId !== undefined && initialContentId.length > 0) {
minioDocument = await this.getMinioDocument(initialContentId, token)
try {
minioDocument = await this.getMinioDocument(initialContentId, token)
} catch (err: any) {
// Do nothing
// Initial content document also might not have been initialized in minio (e.g. if it's an empty template)
}
}
}