fix: add error handling for volume backup notification sending

This commit is contained in:
Mauricio Siu
2026-03-07 00:41:14 -06:00
parent 675c1d7a7d
commit 4be25da185
@@ -131,6 +131,7 @@ export const runVolumeBackup = async (volumeBackupId: string) => {
? "mongodb" ? "mongodb"
: volumeBackup.serviceType; : volumeBackup.serviceType;
try {
await sendVolumeBackupNotifications({ await sendVolumeBackupNotifications({
projectName, projectName,
applicationName: volumeBackup.name, applicationName: volumeBackup.name,
@@ -139,6 +140,9 @@ export const runVolumeBackup = async (volumeBackupId: string) => {
type: "success", type: "success",
organizationId, organizationId,
}); });
} catch (notificationError) {
console.error("Failed to send volume backup success notification", notificationError);
}
} catch (error) { } catch (error) {
const { VOLUME_BACKUPS_PATH } = paths(!!serverId); const { VOLUME_BACKUPS_PATH } = paths(!!serverId);
const volumeBackupPath = path.join( const volumeBackupPath = path.join(
@@ -160,6 +164,7 @@ export const runVolumeBackup = async (volumeBackupId: string) => {
? "mongodb" ? "mongodb"
: volumeBackup.serviceType; : volumeBackup.serviceType;
try {
await sendVolumeBackupNotifications({ await sendVolumeBackupNotifications({
projectName, projectName,
applicationName: volumeBackup.name, applicationName: volumeBackup.name,
@@ -169,5 +174,8 @@ export const runVolumeBackup = async (volumeBackupId: string) => {
organizationId, organizationId,
errorMessage: error instanceof Error ? error.message : String(error), errorMessage: error instanceof Error ? error.message : String(error),
}); });
} catch (notificationError) {
console.error("Failed to send volume backup error notification", notificationError);
}
} }
}; };