From 35baf219e0a882e1b1e491cc11053b7d92a3c6f5 Mon Sep 17 00:00:00 2001 From: Alexey Zinoviev Date: Mon, 25 Dec 2023 12:25:13 +0700 Subject: [PATCH] ezqms-449: wrap initial collaborator content loading with try-catch 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) + } } }