Skip to content

Commit 2442494

Browse files
committed
fix(application): simplify error message handling in deployment notifications
1 parent bac2afb commit 2442494

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

packages/server/src/services/application.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -238,20 +238,12 @@ export const deployApplication = async ({
238238
await updateDeploymentStatus(deployment.deploymentId, "error");
239239
await updateApplicationStatus(applicationId, "error");
240240

241-
const errorMessage =
242-
error instanceof Error
243-
? error.message
244-
: String(error) || "Error building";
245-
// Truncate and sanitize error message for notifications
246-
const sanitizedErrorMessage = errorMessage
247-
.replace(/ghs_[a-zA-Z0-9]+/g, "ghs_***") // Hide GitHub tokens
248-
.substring(0, 1500); // Truncate to avoid notification limits
249-
250241
await sendBuildErrorNotifications({
251242
projectName: application.project.name,
252243
applicationName: application.name,
253244
applicationType: "application",
254-
errorMessage: sanitizedErrorMessage,
245+
// @ts-ignore
246+
errorMessage: error?.message || "Error building",
255247
buildLink,
256248
organizationId: application.project.organizationId,
257249
});

0 commit comments

Comments
 (0)