Skip to content

Commit

Permalink
[Webhook] Remove user-submitted type from HTTP response
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Nov 6, 2023
1 parent 5bff8c5 commit 8128c30
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -38,7 +38,7 @@ public function __construct(
public function handle(string $type, Request $request): Response
{
if (!isset($this->parsers[$type])) {
return new Response(sprintf('No parser found for webhook of type "%s".', $type), 404);
return new Response('No webhook parser found for the type given in the URL.', 404, ['Content-Type' => 'text/plain']);
}
/** @var RequestParserInterface $parser */
$parser = $this->parsers[$type]['parser'];
Expand Down

0 comments on commit 8128c30

Please sign in to comment.