Symfony Exception

ServerException

HTTP 500 Internal Server Error

HTTP/1.1 500 Internal Server Error returned for "https://intra.cecytechihuahua.edu.mx/rest/api/services/newspaper/fcc997fa-cd19-4993-aa70-08da005c909f".

Exception

Symfony\Component\HttpClient\Exception\ ServerException

  1.     private function checkStatusCode()
  2.     {
  3.         $code $this->getInfo('http_code');
  4.         if (500 <= $code) {
  5.             throw new ServerException($this);
  6.         }
  7.         if (400 <= $code) {
  8.             throw new ClientException($this);
  9.         }
  1.         if ($this->initializer) {
  2.             self::initialize($this);
  3.         }
  4.         if ($throw) {
  5.             $this->checkStatusCode();
  6.         }
  7.         if (null === $this->content) {
  8.             $content null;
  1.     {
  2.         $performing $this->multi->performing;
  3.         $this->multi->performing $performing || '_0' === curl_getinfo($this->handle\CURLINFO_PRIVATE);
  4.         try {
  5.             return $this->doGetContent($throw);
  6.         } finally {
  7.             $this->multi->performing $performing;
  8.         }
  9.     }
CurlResponse->getContent() in src/Methods/Methods.php (line 101)
  1.         $response $client->request(
  2.             'GET',
  3.             //$this->baseUrl . 'WebPage/Sections'
  4.             $this->intraServerUrl 'rest/api/services/newspaper/' $sectionId
  5.         );
  6.         $content $response->getContent();
  7.         $content json_decode($contenttrue);
  8.         if ($content == null || $content == "") {
  9.             return null;
  10.         }
  11.         return $content['result'];
Methods->getOneSectionById() in src/Methods/Methods.php (line 280)
  1.      * @throws ClientExceptionInterface
  2.      */
  3.     public function getSectionById(HttpClientInterface $client$type$id): object
  4.     {
  5.         $news = array();
  6.         $section $this->getOneSectionById($client$id);
  7.         //foreach ($sections as $section) {
  8.         //    if ($section['Type'] === $type && $section['id'] === $id && $section['Active']) {
  9.                 $news = (object) array(
  10.                     'id' => $section['id'],
  11.                     'title' => $section['Title'],
Methods->getSectionById() in src/Controller/SectionsController.php (line 42)
  1.     public function detail(HttpClientInterface $client$type$id): Response
  2.     {
  3.         $methods = new Methods();
  4.         $unitsEmsad $methods->getUnitsByEmsad($client);
  5.         $unitsCecyte $methods->getUnitsByCecyte($client);
  6.         $sectionById $methods->getSectionById($client$type$id);
  7.         return $this->render('sections/detail.html.twig', [
  8.             'isSuccess' => true,
  9.             'unitsCecyte' => $unitsCecyte,
  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);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  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.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 35)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/var/www/vhosts/cecytechihuahua.edu.mx/httpdocs/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

ServerException
Symfony\Component\HttpClient\Exception\ServerException:
HTTP/1.1 500 Internal Server Error returned for "https://intra.cecytechihuahua.edu.mx/rest/api/services/newspaper/fcc997fa-cd19-4993-aa70-08da005c909f".

  at vendor/symfony/http-client/Response/CommonResponseTrait.php:174
  at Symfony\Component\HttpClient\Response\CurlResponse->checkStatusCode()
     (vendor/symfony/http-client/Response/CommonResponseTrait.php:48)
  at Symfony\Component\HttpClient\Response\CurlResponse->doGetContent()
     (vendor/symfony/http-client/Response/CurlResponse.php:232)
  at Symfony\Component\HttpClient\Response\CurlResponse->getContent()
     (src/Methods/Methods.php:101)
  at App\Methods\Methods->getOneSectionById()
     (src/Methods/Methods.php:280)
  at App\Methods\Methods->getSectionById()
     (src/Controller/SectionsController.php:42)
  at App\Controller\SectionsController->detail()
     (vendor/symfony/http-kernel/HttpKernel.php:163)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:35)
  at require_once('/var/www/vhosts/cecytechihuahua.edu.mx/httpdocs/vendor/autoload_runtime.php')
     (public/index.php:5)