Skip to content

Commit 0921733

Browse files
committed
capture ffmpeg oom errors
1 parent 339f4ac commit 0921733

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

packages/core/src/v3/errors.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,16 @@ export function taskRunErrorEnhancer(error: TaskRunError): EnhanceError<TaskRunE
427427
};
428428
}
429429
}
430+
431+
if (error.name === "Error") {
432+
if (error.message === "ffmpeg was killed with signal SIGKILL") {
433+
return {
434+
type: "INTERNAL_ERROR",
435+
code: TaskRunErrorCodes.TASK_PROCESS_OOM_KILLED,
436+
...prettyInternalErrors.TASK_PROCESS_OOM_KILLED,
437+
};
438+
}
439+
}
430440
break;
431441
}
432442
case "STRING_ERROR": {
@@ -481,6 +491,15 @@ export function exceptionEventEnhancer(
481491
}
482492
break;
483493
}
494+
case "Error": {
495+
if (exception.message === "ffmpeg was killed with signal SIGKILL") {
496+
return {
497+
...exception,
498+
...prettyInternalErrors.TASK_PROCESS_OOM_KILLED,
499+
};
500+
}
501+
break;
502+
}
484503
case TaskRunErrorCodes.TASK_PROCESS_MAYBE_OOM_KILLED:
485504
case TaskRunErrorCodes.TASK_PROCESS_OOM_KILLED:
486505
case TaskRunErrorCodes.TASK_PROCESS_SIGTERM: {

0 commit comments

Comments
 (0)