Skip to content

Commit

Permalink
ezqms-449: wrap initial collaborator content loading with try-catch (#…
Browse files Browse the repository at this point in the history
…4256)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
  • Loading branch information
lexiv0re authored Dec 25, 2023
1 parent 6cc84f0 commit e65783b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/collaborator/src/extensions/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

Expand Down

0 comments on commit e65783b

Please sign in to comment.