Skip to content

Commit 8128c30

Browse files
[Webhook] Remove user-submitted type from HTTP response
1 parent 5bff8c5 commit 8128c30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Webhook/Controller/WebhookController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(
3838
public function handle(string $type, Request $request): Response
3939
{
4040
if (!isset($this->parsers[$type])) {
41-
return new Response(sprintf('No parser found for webhook of type "%s".', $type), 404);
41+
return new Response('No webhook parser found for the type given in the URL.', 404, ['Content-Type' => 'text/plain']);
4242
}
4343
/** @var RequestParserInterface $parser */
4444
$parser = $this->parsers[$type]['parser'];

0 commit comments

Comments
 (0)