@@ -237,6 +237,7 @@ export const deployApplication = async ({
237237 } catch ( error ) {
238238 await updateDeploymentStatus ( deployment . deploymentId , "error" ) ;
239239 await updateApplicationStatus ( applicationId , "error" ) ;
240+
240241 await sendBuildErrorNotifications ( {
241242 projectName : application . project . name ,
242243 applicationName : application . name ,
@@ -370,8 +371,9 @@ export const deployRemoteApplication = async ({
370371 domains : application . domains ,
371372 } ) ;
372373 } 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 ) ;
375377
376378 await execAsyncRemote (
377379 application . serverId ,
@@ -383,12 +385,12 @@ export const deployRemoteApplication = async ({
383385
384386 await updateDeploymentStatus ( deployment . deploymentId , "error" ) ;
385387 await updateApplicationStatus ( applicationId , "error" ) ;
388+
386389 await sendBuildErrorNotifications ( {
387390 projectName : application . project . name ,
388391 applicationName : application . name ,
389392 applicationType : "application" ,
390- // @ts -ignore
391- errorMessage : error ?. message || "Error building" ,
393+ errorMessage : `Please check the logs for details: ${ errorMessage } ` ,
392394 buildLink,
393395 organizationId : application . project . organizationId ,
394396 } ) ;
0 commit comments