From e65783bfd2d70ac9a8244cb840aaa746bb4414a2 Mon Sep 17 00:00:00 2001 From: Alexey Zinoviev Date: Mon, 25 Dec 2023 13:03:31 +0700 Subject: [PATCH] ezqms-449: wrap initial collaborator content loading with try-catch (#4256) Signed-off-by: Alexey Zinoviev --- server/collaborator/src/extensions/storage.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/collaborator/src/extensions/storage.ts b/server/collaborator/src/extensions/storage.ts index 21b587e356..51ee30dfaa 100644 --- a/server/collaborator/src/extensions/storage.ts +++ b/server/collaborator/src/extensions/storage.ts @@ -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) + } } }