Error 500 Internal Server Error

GET http://etiennewalch.fr/

Exceptions

HTTP/2 401 returned for "https://api.brevo.com/v3/smtp/email".

Exception

Symfony\Component\HttpClient\Exception\ ClientException

Show exception properties
Symfony\Component\HttpClient\Exception\ClientException {#451
  -response: Symfony\Component\HttpClient\Response\CurlResponse {#439
    response_headers: 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"
    ]
    http_code: 401
    error: null
    canceled: false
    http_method: "POST"
    user_data: null
    max_duration: 0.0
    start_time: 1769263735.6322
    original_url: "https://api.brevo.com/v3/smtp/email"
    pause_handler: Closure(float $duration) {#442
      class: "Symfony\Component\HttpClient\Response\CurlResponse"
      use: {
        $ch: CurlHandle {#438 …}
        $multi: Symfony\Component\HttpClient\Internal\CurlClientState {#431 …}
        $execCounter: -9223372036854775808
      }
      file: "/var/www/html/vendor/symfony/http-client/Response/CurlResponse.php"
      line: "98 to 115"
    }
    redirect_url: null
    url: "https://api.brevo.com/v3/smtp/email"
    content_type: "application/json"
    header_size: 443
    request_size: 292
    filetime: -1
    ssl_verify_result: 0
    redirect_count: 0
    total_time: 0.13264
    namelookup_time: 0.027988
    connect_time: 0.031312
    pretransfer_time: 0.082973
    size_upload: 430.0
    size_download: 50.0
    speed_download: 376.0
    speed_upload: 3241.0
    download_content_length: 50.0
    upload_content_length: 430.0
    starttransfer_time: 0.082996
    redirect_time: 0.0
    primary_ip: "141.101.90.107"
    certinfo: []
    primary_port: 443
    local_ip: "172.19.0.2"
    local_port: 52506
    http_version: 3
    protocol: 2
    ssl_verifyresult: 0
    scheme: "HTTPS"
    appconnect_time_us: 82553
    connect_time_us: 31312
    namelookup_time_us: 27988
    pretransfer_time_us: 82973
    redirect_time_us: 0
    starttransfer_time_us: 82996
    total_time_us: 132640
    effective_method: "POST"
    debug: """
      *   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
  }
}
  1.         if (500 <= $code) {
  2.             throw new ServerException($this);
  3.         }
  4.         if (400 <= $code) {
  5.             throw new ClientException($this);
  6.         }
  7.         if (300 <= $code) {
  8.             throw new RedirectionException($this);
  9.         }
  1.     {
  2.         $this->shouldBuffer true;
  3.         if ($this->initializer && null === $this->info['error']) {
  4.             self::initialize($this);
  5.             $this->checkStatusCode();
  6.         }
  7.     }
  8.     /**
  9.      * Implements an event loop based on a buffer activity queue.
  1.         try {
  2.             if (null === $this->timeout) {
  3.                 return; // Unused pushed response
  4.             }
  5.             $this->doDestruct();
  6.         } finally {
  7.             if ($this->handle instanceof \CurlHandle) {
  8.                 curl_setopt($this->handle\CURLOPT_VERBOSEfalse);
  9.             }
  10.         }
  1.     public function __destruct()
  2.     {
  3.         try {
  4.             if (method_exists($this->response'__destruct')) {
  5.                 $this->response->__destruct();
  6.             }
  7.         } finally {
  8.             if ($this->event?->isStarted()) {
  9.                 $this->event->stop();
  10.             }
  1.             if (null !== $onProgress) {
  2.                 $onProgress($dlNow$dlSize$info);
  3.             }
  4.         };
  5.         return new TraceableResponse($this->client$this->client->request($method$url$options), $content$this->stopwatch?->start("$method $url"'http_client'));
  6.     }
  7.     public function stream(ResponseInterface|iterable $responses, ?float $timeout null): ResponseStreamInterface
  8.     {
  9.         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)
  1.         $content "<html><head></head><body>";
  2.         $content .= "<h1>Message de : " $data['email'] . "</h1>";
  3.         $content .= "<p>Message : " $data['message'] . "</p>";
  4.         $content .= "</body></html>";
  5.         $this->httpClient->request(
  6.             'POST',
  7.             'https://api.brevo.com/v3/smtp/email',
  8.             [
  9.                 'headers' => [
  10.                     'content-type' => 'application/json',
BrevoMailer->sendMail(object(Form)) in src/Controller/HomeController.php (line 48)
  1.             ->getForm()
  2.         ;
  3.         $form->handleRequest($request);
  4.         if ($form->isSubmitted() && $form->isValid()) {
  5.             $brevoMailer->sendMail($form);
  6.             $this->addFlash('success'"Votre message a été envoyé avec succès !");
  7.             return $this->redirectToRoute('app_home_index');
  8.         }
  9.         return $this->render('home/index.html.twig', [
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response$event);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2.         $this->requestStack->push($request);
  3.         $response null;
  4.         try {
  5.             return $response $this->handleRaw($request$type);
  6.         } catch (\Throwable $e) {
  7.             if ($e instanceof \Error && !$this->handleAllThrowables) {
  8.                 throw $e;
  9.             }
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  1.     ) {
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         if (Kernel::VERSION_ID >= 60400) {
  7.             $response->send(false);
  8.             if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in vendor/autoload_runtime.php -> run (line 29)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/var/www/html/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

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)