Skip to content

Commit 8bb7861

Browse files
committed
use pretty error helpers exclusively
1 parent 78a3d43 commit 8bb7861

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

packages/core/src/v3/errors.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ export function shouldRetryError(error: TaskRunError): boolean {
179179
case "TASK_EXECUTION_FAILED":
180180
case "TASK_RUN_CRASHED":
181181
case "TASK_RUN_HEARTBEAT_TIMEOUT":
182+
// TODO: check we really want to retry here, these could be oom errors
182183
case "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE":
183184
return true;
184185

@@ -535,16 +536,10 @@ export function taskRunErrorEnhancer(error: TaskRunError): EnhanceError<TaskRunE
535536
}
536537
}
537538

538-
const prettyError = prettyInternalErrors[error.code];
539-
540-
if (prettyError) {
541-
return {
542-
...error,
543-
...prettyError,
544-
};
545-
}
546-
547-
break;
539+
return {
540+
...error,
541+
...getPrettyTaskRunError(error.code),
542+
};
548543
}
549544
}
550545

@@ -607,7 +602,7 @@ export function exceptionEventEnhancer(
607602
case TaskRunErrorCodes.TASK_PROCESS_SIGTERM: {
608603
return {
609604
...exception,
610-
...prettyInternalErrors[exception.type],
605+
...getPrettyExceptionEvent(exception.type),
611606
};
612607
}
613608
}

0 commit comments

Comments
 (0)