@@ -237,6 +237,7 @@ export const deployApplication = async ({
237
237
} catch ( error ) {
238
238
await updateDeploymentStatus ( deployment . deploymentId , "error" ) ;
239
239
await updateApplicationStatus ( applicationId , "error" ) ;
240
+
240
241
await sendBuildErrorNotifications ( {
241
242
projectName : application . project . name ,
242
243
applicationName : application . name ,
@@ -370,8 +371,9 @@ export const deployRemoteApplication = async ({
370
371
domains : application . domains ,
371
372
} ) ;
372
373
} catch ( error ) {
373
- // @ts -ignore
374
- const encodedContent = encodeBase64 ( error ?. message ) ;
374
+ const errorMessage = error instanceof Error ? error . message : String ( error ) ;
375
+
376
+ const encodedContent = encodeBase64 ( errorMessage ) ;
375
377
376
378
await execAsyncRemote (
377
379
application . serverId ,
@@ -383,12 +385,12 @@ export const deployRemoteApplication = async ({
383
385
384
386
await updateDeploymentStatus ( deployment . deploymentId , "error" ) ;
385
387
await updateApplicationStatus ( applicationId , "error" ) ;
388
+
386
389
await sendBuildErrorNotifications ( {
387
390
projectName : application . project . name ,
388
391
applicationName : application . name ,
389
392
applicationType : "application" ,
390
- // @ts -ignore
391
- errorMessage : error ?. message || "Error building" ,
393
+ errorMessage : `Please check the logs for details: ${ errorMessage } ` ,
392
394
buildLink,
393
395
organizationId : application . project . organizationId ,
394
396
} ) ;
0 commit comments