Skip to content

Commit 5df1807

Browse files
committed
pretty internal errors for attempt spans
1 parent d3719b1 commit 5df1807

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

packages/core/src/v3/errors.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,23 @@ export function exceptionEventEnhancer(
514514
}
515515
break;
516516
}
517+
case "Internal error": {
518+
if (exception.message?.startsWith(TaskRunErrorCodes.TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE)) {
519+
if (exception.message?.includes("SIGTERM")) {
520+
return {
521+
...exception,
522+
...prettyInternalErrors.TASK_PROCESS_SIGTERM,
523+
};
524+
}
525+
526+
return {
527+
...exception,
528+
...prettyInternalErrors.TASK_PROCESS_MAYBE_OOM_KILLED,
529+
type: TaskRunErrorCodes.TASK_PROCESS_MAYBE_OOM_KILLED,
530+
};
531+
}
532+
break;
533+
}
517534
case "Error": {
518535
if (exception.message === "ffmpeg was killed with signal SIGKILL") {
519536
return {

0 commit comments

Comments
 (0)