Files
coolify/app/Exceptions/InvalidWebhookPayloadException.php
T
Andras BacsaiandClaude Opus 5.5 eeda90a8a4 fix(webhooks): reject malformed payload values without a 500
Every webhook handler (GitHub, GitLab, Gitea, Bitbucket, GitHub App,
GitLab App) now reads the fields it uses through typed readers: refs,
titles, and actions must be strings, ids positive integers, commit
SHAs 7-64 hex characters, and URLs http(s). An invalid value returns
"Nothing to do. Invalid '<field>' in the request." without a
deployment. Signature checks and the failure lockout are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 14:37:21 +02:00

20 lines
448 B
PHP

<?php
namespace App\Exceptions;
use Exception;
/**
* A webhook payload field has a wrong type or format.
*
* Webhook handlers catch this exception and send a clean "Nothing to do."
* response. The request does not deploy anything.
*/
class InvalidWebhookPayloadException extends Exception
{
public static function forField(string $field): self
{
return new self("Nothing to do. Invalid '{$field}' in the request.");
}
}