@@ -131,14 +131,21 @@ export const runVolumeBackup = async (volumeBackupId: string) => {
131131 ? "mongodb"
132132 : volumeBackup . serviceType ;
133133
134- await sendVolumeBackupNotifications ( {
135- projectName,
136- applicationName : volumeBackup . name ,
137- volumeName : volumeBackup . volumeName ,
138- serviceType : mappedServiceType ,
139- type : "success" ,
140- organizationId,
141- } ) ;
134+ try {
135+ await sendVolumeBackupNotifications ( {
136+ projectName,
137+ applicationName : volumeBackup . name ,
138+ volumeName : volumeBackup . volumeName ,
139+ serviceType : mappedServiceType ,
140+ type : "success" ,
141+ organizationId,
142+ } ) ;
143+ } catch ( notificationError ) {
144+ console . error (
145+ "Failed to send volume backup success notification" ,
146+ notificationError ,
147+ ) ;
148+ }
142149 } catch ( error ) {
143150 const { VOLUME_BACKUPS_PATH } = paths ( ! ! serverId ) ;
144151 const volumeBackupPath = path . join (
@@ -160,14 +167,21 @@ export const runVolumeBackup = async (volumeBackupId: string) => {
160167 ? "mongodb"
161168 : volumeBackup . serviceType ;
162169
163- await sendVolumeBackupNotifications ( {
164- projectName,
165- applicationName : volumeBackup . name ,
166- volumeName : volumeBackup . volumeName ,
167- serviceType : mappedServiceType ,
168- type : "error" ,
169- organizationId,
170- errorMessage : error instanceof Error ? error . message : String ( error ) ,
171- } ) ;
170+ try {
171+ await sendVolumeBackupNotifications ( {
172+ projectName,
173+ applicationName : volumeBackup . name ,
174+ volumeName : volumeBackup . volumeName ,
175+ serviceType : mappedServiceType ,
176+ type : "error" ,
177+ organizationId,
178+ errorMessage : error instanceof Error ? error . message : String ( error ) ,
179+ } ) ;
180+ } catch ( notificationError ) {
181+ console . error (
182+ "Failed to send volume backup error notification" ,
183+ notificationError ,
184+ ) ;
185+ }
172186 }
173187} ;
0 commit comments