We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a0577f commit d180c57Copy full SHA for d180c57
apps/web/workflows/process-video.ts
@@ -26,10 +26,6 @@ interface VideoProcessingResult {
26
};
27
}
28
29
-function getErrorMessage(error: unknown): string {
30
- return error instanceof Error ? error.message : String(error);
31
-}
32
-
33
function getValidDuration(duration: number) {
34
return Number.isFinite(duration) && duration > 0 ? duration : undefined;
35
@@ -60,7 +56,8 @@ export async function processVideoWorkflow(
60
56
metadata: result.metadata,
61
57
62
58
} catch (error) {
63
- await setProcessingError(videoId, getErrorMessage(error));
59
+ const errorMessage = error instanceof Error ? error.message : String(error);
+ await setProcessingError(videoId, errorMessage);
64
throw error;
65
66
0 commit comments