We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 109e536 commit 2322abfCopy full SHA for 2322abf
packages/api/src/modules/thumbnail/thumbnail.service.ts
@@ -94,7 +94,7 @@ export class ThumbnailService {
94
} catch (error: any) {
95
file.thumbnailError = error.message;
96
await this.em.persistAndFlush(file);
97
- throw error;
+ return null;
98
}
99
100
@@ -175,6 +175,10 @@ export class ThumbnailService {
175
176
const file = await this.fileService.getFile(fileId, request);
177
const thumbnail = await this.createThumbnail(file);
178
+ if (!thumbnail) {
179
+ throw new BadRequestException("Failed to generate thumbnail.");
180
+ }
181
+
182
return reply
183
.header("X-Micro-Generated", "true")
184
.header("X-Micro-Duration", thumbnail.duration)
0 commit comments