Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(notifications): add toWebhook payload to Hetzner deletion failure notification

peaklabs-dev9f6ed823ce5d
diff --git a/app/Notifications/Server/HetznerDeletionFailed.php b/app/Notifications/Server/HetznerDeletionFailed.php
index a109a4360d..6c2712b68d 100644
--- a/app/Notifications/Server/HetznerDeletionFailed.php
+++ b/app/Notifications/Server/HetznerDeletionFailed.php
@@ -65,4 +65,16 @@ class HetznerDeletionFailed extends CustomEmailNotification
color: SlackMessage::errorColor()
);
}
+
+ public function toWebhook(): array
+ {
+ return [
+ 'success' => false,
+ 'message' => "[ACTION REQUIRED] Failed to delete Hetzner server #{$this->hetznerServerId} from Hetzner Cloud. The server has been removed from Coolify, but may still exist in your Hetzner Cloud account.",
+ 'event' => 'hetzner_deletion_failed',
+ 'hetzner_server_id' => $this->hetznerServerId,
+ 'error' => $this->errorMessage,
+ 'url' => base_url().'/servers',
+ ];
+ }
}