Exceptions
Exception
Symfony\Component\HttpClient\Exception\ ClientException
Show exception properties
Symfony\Component\HttpClient\Exception\ClientException {#451 -response: Symfony\Component\HttpClient\Response\CurlResponse {#439 : array:13 [ 0 => "HTTP/2 401 " 1 => "date: Sat, 24 Jan 2026 14:08:55 GMT" 2 => "content-type: application/json" 3 => "content-length: 50" 4 => "cf-ray: 9c301b0c3b0f3cfe-CDG" 5 => "access-control-allow-credentials: true" 6 => "sib-request-id: 1114c8a2-b45b-975a-b078-339e9e4d6e8e" 7 => "access-control-allow-origin: *" 8 => "access-control-allow-headers: *" 9 => "access-control-allow-methods: PUT, POST, GET, DELETE, PATCH, OPTIONS" 10 => "x-envoy-upstream-service-time: 7" 11 => "cf-cache-status: DYNAMIC" 12 => "server: cloudflare" ] : 401 : null : false : "POST" : null : 0.0 : 1769263735.6322 : "https://api.brevo.com/v3/smtp/email" : Closure(float $duration) {#442 : "Symfony\Component\HttpClient\Response\CurlResponse" : { : CurlHandle {#438 …} : Symfony\Component\HttpClient\Internal\CurlClientState {#431 …} : -9223372036854775808 } : "/var/www/html/vendor/symfony/http-client/Response/CurlResponse.php" : "98 to 115" } : null : "https://api.brevo.com/v3/smtp/email" : "application/json" : 443 : 292 : -1 : 0 : 0 : 0.13264 : 0.027988 : 0.031312 : 0.082973 : 430.0 : 50.0 : 376.0 : 3241.0 : 50.0 : 430.0 : 0.082996 : 0.0 : "141.101.90.107" : [] : 443 : "172.19.0.2" : 52506 : 3 : 2 : 0 : "HTTPS" : 82553 : 31312 : 27988 : 82973 : 0 : 82996 : 132640 : "POST" : """ * Trying 141.101.90.107:443...\n * Connected to api.brevo.com (141.101.90.107) port 443 (#0)\n * ALPN: offers h2,http/1.1\n * CAfile: /etc/ssl/certs/ca-certificates.crt\n * CApath: /etc/ssl/certs\n * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384\n * ALPN: server accepted h2\n * Server certificate:\n * subject: CN=brevo.com\n * start date: Dec 5 11:57:18 2025 GMT\n * expire date: Mar 5 12:57:15 2026 GMT\n * subjectAltName: host "api.brevo.com" matched cert's "*.brevo.com"\n * issuer: C=US; O=Google Trust Services; CN=WE1\n * SSL certificate verify ok.\n * using HTTP/2\n * h2h3 [:method: POST]\n * h2h3 [:path: /v3/smtp/email]\n * h2h3 [:scheme: https]\n * h2h3 [:authority: api.brevo.com]\n * h2h3 [content-type: application/json]\n * h2h3 [accept: application/json]\n * h2h3 [api-key: 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]\n * h2h3 [user-agent: Symfony HttpClient (Curl)]\n * h2h3 [accept-encoding: gzip]\n * h2h3 [content-length: 430]\n * Using Stream ID: 1 (easy handle 0x55cbe8b46cd0)\n > POST /v3/smtp/email HTTP/2\r\n Host: api.brevo.com\r\n content-type: application/json\r\n accept: application/json\r\n api-key: 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\r\n user-agent: Symfony HttpClient (Curl)\r\n accept-encoding: gzip\r\n content-length: 430\r\n \r\n * We are completely uploaded and fine\n * old SSL session ID is stale, removing\n < HTTP/2 401 \r\n < date: Sat, 24 Jan 2026 14:08:55 GMT\r\n < content-type: application/json\r\n < content-length: 50\r\n < cf-ray: 9c301b0c3b0f3cfe-CDG\r\n < access-control-allow-credentials: true\r\n < sib-request-id: 1114c8a2-b45b-975a-b078-339e9e4d6e8e\r\n < access-control-allow-origin: *\r\n < access-control-allow-headers: *\r\n < access-control-allow-methods: PUT, POST, GET, DELETE, PATCH, OPTIONS\r\n < x-envoy-upstream-service-time: 7\r\n < cf-cache-status: DYNAMIC\r\n < server: cloudflare\r\n < \r\n * Connection #0 to host api.brevo.com left intact\n """ …16 } }
if (500 <= $code) {throw new ServerException($this);}if (400 <= $code) {throw new ClientException($this);}if (300 <= $code) {throw new RedirectionException($this);}
in
vendor/symfony/http-client/Response/TransportResponseTrait.php
->
checkStatusCode
(line 131)
{$this->shouldBuffer = true;if ($this->initializer && null === $this->info['error']) {self::initialize($this);$this->checkStatusCode();}}/*** Implements an event loop based on a buffer activity queue.
in
vendor/symfony/http-client/Response/CurlResponse.php
->
doDestruct
(line 242)
try {if (null === $this->timeout) {return; // Unused pushed response}$this->doDestruct();} finally {if ($this->handle instanceof \CurlHandle) {curl_setopt($this->handle, \CURLOPT_VERBOSE, false);}}
in
vendor/symfony/http-client/Response/TraceableResponse.php
->
__destruct
(line 61)
public function __destruct(){try {if (method_exists($this->response, '__destruct')) {$this->response->__destruct();}} finally {if ($this->event?->isStarted()) {$this->event->stop();}
in
vendor/symfony/http-client/TraceableHttpClient.php
->
__destruct
(line 66)
if (null !== $onProgress) {$onProgress($dlNow, $dlSize, $info);}};return new TraceableResponse($this->client, $this->client->request($method, $url, $options), $content, $this->stopwatch?->start("$method $url", 'http_client'));}public function stream(ResponseInterface|iterable $responses, ?float $timeout = null): ResponseStreamInterface{if ($responses instanceof TraceableResponse) {
TraceableHttpClient->request('POST', 'https://api.brevo.com/v3/smtp/email', array('headers' => array('content-type' => 'application/json', 'accept' => 'application/json', 'api-key' => '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'), 'json' => array('sender' => array('email' => 'tinouclt@gmail.com'), 'to' => array(array('name' => 'WALCH Etienne', 'email' => 'tinouclt@gmail.com')), 'subject' => null, 'htmlContent' => '<html><head></head><body><h1>Message de : emmajunse664948@gmail.com</h1><p>Message : Let\'s make this a night to remember - https://nMm5id.short.gy/Osi49c?Achiele</p></body></html>'), 'on_progress' => object(Closure)))
in
src/Service/BrevoMailer.php
(line 31)
$content = "<html><head></head><body>";$content .= "<h1>Message de : " . $data['email'] . "</h1>";$content .= "<p>Message : " . $data['message'] . "</p>";$content .= "</body></html>";$this->httpClient->request('POST','https://api.brevo.com/v3/smtp/email',['headers' => ['content-type' => 'application/json',
->getForm();$form->handleRequest($request);if ($form->isSubmitted() && $form->isValid()) {$brevoMailer->sendMail($form);$this->addFlash('success', "Votre message a été envoyé avec succès !");return $this->redirectToRoute('app_home_index');}return $this->render('home/index.html.twig', [
in
vendor/symfony/http-kernel/HttpKernel.php
->
index
(line 178)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response, $event);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 76)
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try {return $response = $this->handleRaw($request, $type);} catch (\Throwable $e) {if ($e instanceof \Error && !$this->handleAllThrowables) {throw $e;}
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 185)
$this->boot();++$this->requestStackSize;$this->resetServices = true;try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
) {}public function run(): int{$response = $this->kernel->handle($this->request);if (Kernel::VERSION_ID >= 60400) {$response->send(false);if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in
vendor/autoload_runtime.php
->
run
(line 29)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Logs
No log messages
Stack Trace
|
ClientException
|
|---|
Symfony\Component\HttpClient\Exception\ClientException:
HTTP/2 401 returned for "https://api.brevo.com/v3/smtp/email".
at vendor/symfony/http-client/Response/CommonResponseTrait.php:170
at Symfony\Component\HttpClient\Response\CurlResponse->checkStatusCode()
(vendor/symfony/http-client/Response/TransportResponseTrait.php:131)
at Symfony\Component\HttpClient\Response\CurlResponse->doDestruct()
(vendor/symfony/http-client/Response/CurlResponse.php:242)
at Symfony\Component\HttpClient\Response\CurlResponse->__destruct()
(vendor/symfony/http-client/Response/TraceableResponse.php:61)
at Symfony\Component\HttpClient\Response\TraceableResponse->__destruct()
(vendor/symfony/http-client/TraceableHttpClient.php:66)
at Symfony\Component\HttpClient\TraceableHttpClient->request('POST', 'https://api.brevo.com/v3/smtp/email', array('headers' => array('content-type' => 'application/json', 'accept' => 'application/json', 'api-key' => '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'), 'json' => array('sender' => array('email' => 'tinouclt@gmail.com'), 'to' => array(array('name' => 'WALCH Etienne', 'email' => 'tinouclt@gmail.com')), 'subject' => null, 'htmlContent' => '<html><head></head><body><h1>Message de : emmajunse664948@gmail.com</h1><p>Message : Let\'s make this a night to remember - https://nMm5id.short.gy/Osi49c?Achiele</p></body></html>'), 'on_progress' => object(Closure)))
(src/Service/BrevoMailer.php:31)
at App\Service\BrevoMailer->sendMail(object(Form))
(src/Controller/HomeController.php:48)
at App\Controller\HomeController->index(object(Request), object(BrevoMailer))
(vendor/symfony/http-kernel/HttpKernel.php:178)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:76)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:185)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:29)
at require_once('/var/www/html/vendor/autoload_runtime.php')
(public/index.php:5)
|