From 2442494096250f116c03ccf9dadd98828d700383 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Mon, 28 Jul 2025 01:51:21 -0600 Subject: [PATCH] fix(application): simplify error message handling in deployment notifications --- packages/server/src/services/application.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/server/src/services/application.ts b/packages/server/src/services/application.ts index 571a6fa83..a8effba98 100644 --- a/packages/server/src/services/application.ts +++ b/packages/server/src/services/application.ts @@ -238,20 +238,12 @@ export const deployApplication = async ({ await updateDeploymentStatus(deployment.deploymentId, "error"); await updateApplicationStatus(applicationId, "error"); - const errorMessage = - error instanceof Error - ? error.message - : String(error) || "Error building"; - // Truncate and sanitize error message for notifications - const sanitizedErrorMessage = errorMessage - .replace(/ghs_[a-zA-Z0-9]+/g, "ghs_***") // Hide GitHub tokens - .substring(0, 1500); // Truncate to avoid notification limits - await sendBuildErrorNotifications({ projectName: application.project.name, applicationName: application.name, applicationType: "application", - errorMessage: sanitizedErrorMessage, + // @ts-ignore + errorMessage: error?.message || "Error building", buildLink, organizationId: application.project.organizationId, });