feat(BackupNotification): include database name in BackupFailed notification for better context

This commit is contained in:
Andras Bacsai committed 2025-11-11 15:27:57 +01:00
1 parent 684a08bf75
commit 334892d1ff
2 files changed
+4 -2

No files matched your search

+3 -1
View File
@@ -705,7 +705,9 @@ class DatabaseBackupJob implements ShouldBeEncrypted, ShouldQueue
// Notify team about permanent failure
if ($this->team) {
$this->team->notify(new BackupFailed($this->backup, $this->database, $this->backup_output));
$databaseName = $log?->database_name ?? 'unknown';
$output = $this->backup_output ?? $exception?->getMessage() ?? 'Unknown error';
$this->team->notify(new BackupFailed($this->backup, $this->database, $output, $databaseName));
}
}
}