From 34c896e6b448cf2d99a81bf89008bd56a257fce8 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 5 Jun 2024 08:52:18 +0100 Subject: [PATCH] handle all coordinator errors --- apps/coordinator/src/index.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/apps/coordinator/src/index.ts b/apps/coordinator/src/index.ts index 48bc2fa03..8bd7a377d 100644 --- a/apps/coordinator/src/index.ts +++ b/apps/coordinator/src/index.ts @@ -946,6 +946,14 @@ class TaskCoordinator { socket.data.attemptFriendlyId = executionAck.payload.execution.attempt.id; } catch (error) { logger.error("Error", { error }); + + await crashRun({ + name: "ReadyForExecutionError", + message: + error instanceof Error ? `Unexpected error: ${error.message}` : "Unexpected error", + }); + + return; } }); @@ -986,6 +994,14 @@ class TaskCoordinator { }); } catch (error) { logger.error("Error", { error }); + + await crashRun({ + name: "ReadyForLazyAttemptError", + message: + error instanceof Error ? `Unexpected error: ${error.message}` : "Unexpected error", + }); + + return; } });