summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/DriveService.ts
diff options
context:
space:
mode:
authorPrivateGER <privateger@privateger.me>2025-05-29 21:20:46 +0200
committerPrivateGER <privateger@privateger.me>2025-05-29 21:20:46 +0200
commit7ce8d0de446d3a69592a51d15e41cedd811a1fa5 (patch)
treeb463c87c6dfe7c3350d650b61b806f68a176c27c /packages/backend/src/core/DriveService.ts
parentMove supported MIME types into file-level const (diff)
downloadsharkey-7ce8d0de446d3a69592a51d15e41cedd811a1fa5.tar.gz
sharkey-7ce8d0de446d3a69592a51d15e41cedd811a1fa5.tar.bz2
sharkey-7ce8d0de446d3a69592a51d15e41cedd811a1fa5.zip
Add error handling for video optimization in DriveService
Diffstat (limited to 'packages/backend/src/core/DriveService.ts')
-rw-r--r--packages/backend/src/core/DriveService.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/backend/src/core/DriveService.ts b/packages/backend/src/core/DriveService.ts
index abe9131089..73125f36d7 100644
--- a/packages/backend/src/core/DriveService.ts
+++ b/packages/backend/src/core/DriveService.ts
@@ -160,7 +160,11 @@ export class DriveService {
const alts = await this.generateAlts(path, type, !file.uri);
if (type && type.startsWith('video/')) {
- await this.videoProcessingService.webOptimizeVideo(path, type);
+ try {
+ await this.videoProcessingService.webOptimizeVideo(path, type);
+ } catch (err) {
+ this.registerLogger.warn(`Video optimization failed: ${err instanceof Error ? err.message : String(err)}`, { error: err });
+ }
}
if (this.meta.useObjectStorage) {