Symfony Exception

ConnectException

HTTP 500 Internal Server Error

cURL error 6: Could not resolve host: adm.imobiliariaperez.com.br (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://adm.imobiliariaperez.com.br/api/collections/get/category?token=ae38dfee8fac2ff9149c835bbf9fcf

Exception

GuzzleHttp\Exception\ ConnectException

  1.             $message .= \sprintf(' for %s'$uriString);
  2.         }
  3.         // Create a connection exception if it was a specific error code.
  4.         $error = isset($connectionErrors[$easy->errno])
  5.             ? new ConnectException($message$easy->requestnull$ctx)
  6.             : new RequestException($message$easy->request$easy->responsenull$ctx);
  7.         return P\Create::rejectionFor($error);
  8.     }
  1.         // Retry when nothing is present or when curl failed to rewind.
  2.         if (empty($easy->options['_err_message']) && (!$easy->errno || $easy->errno == 65)) {
  3.             return self::retryFailedRewind($handler$easy$ctx);
  4.         }
  5.         return self::createRejection($easy$ctx);
  6.     }
  7.     private static function createRejection(EasyHandle $easy, array $ctx): PromiseInterface
  8.     {
  9.         static $connectionErrors = [
  1.         if (isset($easy->options['on_stats'])) {
  2.             self::invokeStats($easy);
  3.         }
  4.         if (!$easy->response || $easy->errno) {
  5.             return self::finishError($handler$easy$factory);
  6.         }
  7.         // Return the response if it is present and there is no error.
  8.         $factory->release($easy);
  1.         $easy $this->factory->create($request$options);
  2.         \curl_exec($easy->handle);
  3.         $easy->errno \curl_errno($easy->handle);
  4.         return CurlFactory::finish($this$easy$this->factory);
  5.     }
  6. }
  1.      * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
  2.      */
  3.     public static function wrapSync(callable $default, callable $sync): callable
  4.     {
  5.         return static function (RequestInterface $request, array $options) use ($default$sync): PromiseInterface {
  6.             return empty($options[RequestOptions::SYNCHRONOUS]) ? $default($request$options) : $sync($request$options);
  7.         };
  8.     }
  9.     /**
  10.      * Sends streaming requests to a streaming compatible handler while sending
  1.      * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
  2.      */
  3.     public static function wrapStreaming(callable $default, callable $streaming): callable
  4.     {
  5.         return static function (RequestInterface $request, array $options) use ($default$streaming): PromiseInterface {
  6.             return empty($options['stream']) ? $default($request$options) : $streaming($request$options);
  7.         };
  8.     }
  9. }
  1.         }
  2.         // Add the expect header if needed.
  3.         $this->addExpectHeader($request$options$modify);
  4.         return $fn(Psr7\Utils::modifyRequest($request$modify), $options);
  5.     }
  6.     /**
  7.      * Add expect header
  8.      */
  1.     public static function cookies(): callable
  2.     {
  3.         return static function (callable $handler): callable {
  4.             return static function ($request, array $options) use ($handler) {
  5.                 if (empty($options['cookies'])) {
  6.                     return $handler($request$options);
  7.                 } elseif (!($options['cookies'] instanceof CookieJarInterface)) {
  8.                     throw new \InvalidArgumentException('cookies must be an instance of GuzzleHttp\Cookie\CookieJarInterface');
  9.                 }
  10.                 $cookieJar $options['cookies'];
  11.                 $request $cookieJar->withCookieHeader($request);
  1.         if (empty($options['allow_redirects']['max'])) {
  2.             return $fn($request$options);
  3.         }
  4.         return $fn($request$options)
  5.             ->then(function (ResponseInterface $response) use ($request$options) {
  6.                 return $this->checkRedirect($request$options$response);
  7.             });
  8.     }
  1.             return static function ($request, array $options) use ($handler$bodySummarizer) {
  2.                 if (empty($options['http_errors'])) {
  3.                     return $handler($request$options);
  4.                 }
  5.                 return $handler($request$options)->then(
  6.                     static function (ResponseInterface $response) use ($request$bodySummarizer) {
  7.                         $code $response->getStatusCode();
  8.                         if ($code 400) {
  9.                             return $response;
  10.                         }
  1.      */
  2.     public function __invoke(RequestInterface $request, array $options)
  3.     {
  4.         $handler $this->resolve();
  5.         return $handler($request$options);
  6.     }
  7.     /**
  8.      * Dumps a string representation of the stack.
  9.      *
  1.         $request $this->applyOptions($request$options);
  2.         /** @var HandlerStack $handler */
  3.         $handler $options['handler'];
  4.         try {
  5.             return P\Create::promiseFor($handler($request$options));
  6.         } catch (\Exception $e) {
  7.             return P\Create::rejectionFor($e);
  8.         }
  9.     }
  1.         }
  2.         $request = new Psr7\Request($method$uri$headers$body$version);
  3.         // Remove the option so that they are not doubly-applied.
  4.         unset($options['headers'], $options['body'], $options['version']);
  5.         return $this->transfer($request$options);
  6.     }
  7.     /**
  8.      * Create and send an HTTP request.
  9.      *
  1.      */
  2.     public function request(string $method$uri '', array $options = []): ResponseInterface
  3.     {
  4.         $options[RequestOptions::SYNCHRONOUS] = true;
  5.         return $this->requestAsync($method$uri$options)->wait();
  6.     }
  7.     /**
  8.      * Get a client configuration option.
  9.      *
  1.      *
  2.      * @throws GuzzleException
  3.      */
  4.     public function post($uri, array $options = []): ResponseInterface
  5.     {
  6.         return $this->request('POST'$uri$options);
  7.     }
  8.     /**
  9.      * Create and send an HTTP PATCH request.
  10.      *
  1.         $url $this->apiUrl $action;
  2.         $url .= strpos($url'?') !== false '&' '?';
  3.         $url .= 'token=' $this->token;
  4.         $response $this->client->post($url, [
  5.             'json' => $params,
  6.         ]);
  7.         $responseContents json_decode($response->getBody()->getContents());
  8.         return $responseContents->entries ?? [];
CockpitService->getBlogCategories() in /home/imobi239/public_html/app/Controllers/SiteController.php (line 174)
  1.         return $sitemap->toResponse($request);
  2.     }
  3.     public function blog($categorySlug null): View
  4.     {
  5.         $blogCategories $this->cockpitService->getBlogCategories();
  6.         $categoryDisplay null;
  7.         $indexCategoryInFilter $categorySlug array_search($categorySlugarray_column($blogCategories'title_slug')) : '';
  8.         if (is_numeric($indexCategoryInFilter)) {
  9.             $categoryDisplay $blogCategories[$indexCategoryInFilter]->title;
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
in /home/imobi239/public_html/vendor/illuminate/container/Util.php :: Illuminate\Container\{closure} (line 41)
  1.      * @param  mixed  ...$args
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value, ...$args)
  5.     {
  6.         return $value instanceof Closure $value(...$args) : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  1.             $this->buildStack[] = $className;
  2.             $pushedToBuildStack true;
  3.         }
  4.         $result BoundMethod::call($this$callback$parameters$defaultMethod);
  5.         if ($pushedToBuildStack) {
  6.             array_pop($this->buildStack);
  7.         }
  1.      */
  2.     protected function callControllerCallable(callable $callable, array $parameters = [])
  3.     {
  4.         try {
  5.             return $this->prepareResponse(
  6.                 $this->call($callable$parameters)
  7.             );
  8.         } catch (HttpResponseException $e) {
  9.             return $e->getResponse();
  10.         }
  11.     }
  1.         if (count($middleware) > 0) {
  2.             return $this->callLumenControllerWithMiddleware(
  3.                 $instance$method$routeInfo$middleware
  4.             );
  5.         } else {
  6.             return $this->callControllerCallable(
  7.                 [$instance$method], $routeInfo[2]
  8.             );
  9.         }
  10.     }
  1.         if (! method_exists($instance $this->make($controller), $method)) {
  2.             throw new NotFoundHttpException;
  3.         }
  4.         if ($instance instanceof LumenController) {
  5.             return $this->callLumenController($instance$method$routeInfo);
  6.         } else {
  7.             return $this->callControllerCallable(
  8.                 [$instance$method], $routeInfo[2]
  9.             );
  10.         }
  1.     protected function callActionOnArrayBasedRoute($routeInfo)
  2.     {
  3.         $action $routeInfo[1];
  4.         if (isset($action['uses'])) {
  5.             return $this->prepareResponse($this->callControllerAction($routeInfo));
  6.         }
  7.         foreach ($action as $value) {
  8.             if ($value instanceof Closure) {
  9.                 $callable $value->bindTo(new RoutingClosure);
  1.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  2.             }));
  3.         }
  4.         return $this->prepareResponse(
  5.             $this->callActionOnArrayBasedRoute($routeInfo)
  6.         );
  7.     }
  8.     /**
  9.      * Call the Closure or invokable on the array based route.
  1.             case Dispatcher::NOT_FOUND:
  2.                 throw new NotFoundHttpException;
  3.             case Dispatcher::METHOD_NOT_ALLOWED:
  4.                 throw new MethodNotAllowedHttpException($routeInfo[1]);
  5.             case Dispatcher::FOUND:
  6.                 return $this->handleFoundRoute($routeInfo);
  7.         }
  8.     }
  9.     /**
  10.      * Handle a route found by the dispatcher.
  1.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  2.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  3.                 }
  4.                 return $this->handleDispatcherResponse(
  5.                     $this->createDispatcher()->dispatch($method$pathInfo)
  6.                 );
  7.             });
  8.         } catch (Throwable $e) {
  9.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  1.                 ->send($this->make('request'))
  2.                 ->through($middleware)
  3.                 ->then($then);
  4.         }
  5.         return $then($this->make('request'));
  6.     }
  7.     /**
  8.      * Prepare the response for sending.
  9.      *
  1.         [$method$pathInfo] = $this->parseIncomingRequest($request);
  2.         try {
  3.             $this->boot();
  4.             return $this->sendThroughPipeline($this->middleware, function ($request) use ($method$pathInfo) {
  5.                 $this->instance(Request::class, $request);
  6.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  7.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  8.                 }
  1.      * @param  \Symfony\Component\HttpFoundation\Request|null  $request
  2.      * @return void
  3.      */
  4.     public function run($request null)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if ($response instanceof SymfonyResponse) {
  8.             $response->send();
  9.         } else {
  10.             echo (string) $response;
Application->run() in /home/imobi239/public_html/public/index.php (line 38)
  1. | the client's browser allowing them to enjoy the creative
  2. | and wonderful application we have prepared for them.
  3. |
  4. */
  5. $app->run();

Stack Trace

ConnectException
GuzzleHttp\Exception\ConnectException:
cURL error 6: Could not resolve host: adm.imobiliariaperez.com.br (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://adm.imobiliariaperez.com.br/api/collections/get/category?token=ae38dfee8fac2ff9149c835bbf9fcf

  at /home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210
  at GuzzleHttp\Handler\CurlFactory::createRejection()
     (/home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:158)
  at GuzzleHttp\Handler\CurlFactory::finishError()
     (/home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:110)
  at GuzzleHttp\Handler\CurlFactory::finish()
     (/home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php:47)
  at GuzzleHttp\Handler\CurlHandler->__invoke()
     (/home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php:28)
  at GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}()
     (/home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php:48)
  at GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}()
     (/home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php:64)
  at GuzzleHttp\PrepareBodyMiddleware->__invoke()
     (/home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/Middleware.php:31)
  at GuzzleHttp\Middleware::GuzzleHttp\{closure}()
     (/home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php:71)
  at GuzzleHttp\RedirectMiddleware->__invoke()
     (/home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/Middleware.php:66)
  at GuzzleHttp\Middleware::GuzzleHttp\{closure}()
     (/home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/HandlerStack.php:75)
  at GuzzleHttp\HandlerStack->__invoke()
     (/home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/Client.php:333)
  at GuzzleHttp\Client->transfer()
     (/home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/Client.php:169)
  at GuzzleHttp\Client->requestAsync()
     (/home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/Client.php:189)
  at GuzzleHttp\Client->request()
     (/home/imobi239/public_html/vendor/guzzlehttp/guzzle/src/ClientTrait.php:95)
  at GuzzleHttp\Client->post()
     (/home/imobi239/public_html/app/Services/CockpitService.php:75)
  at App\Services\CockpitService->getBlogCategories()
     (/home/imobi239/public_html/app/Controllers/SiteController.php:174)
  at App\Controllers\SiteController->blog()
     (/home/imobi239/public_html/vendor/illuminate/container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/home/imobi239/public_html/vendor/illuminate/container/Util.php:41)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/home/imobi239/public_html/vendor/illuminate/container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/home/imobi239/public_html/vendor/illuminate/container/BoundMethod.php:35)
  at Illuminate\Container\BoundMethod::call()
     (/home/imobi239/public_html/vendor/illuminate/container/Container.php:662)
  at Illuminate\Container\Container->call()
     (/home/imobi239/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:391)
  at Laravel\Lumen\Application->callControllerCallable()
     (/home/imobi239/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:356)
  at Laravel\Lumen\Application->callLumenController()
     (/home/imobi239/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:331)
  at Laravel\Lumen\Application->callControllerAction()
     (/home/imobi239/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:284)
  at Laravel\Lumen\Application->callActionOnArrayBasedRoute()
     (/home/imobi239/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:269)
  at Laravel\Lumen\Application->handleFoundRoute()
     (/home/imobi239/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:239)
  at Laravel\Lumen\Application->handleDispatcherResponse()
     (/home/imobi239/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:174)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/home/imobi239/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:431)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/home/imobi239/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:167)
  at Laravel\Lumen\Application->dispatch()
     (/home/imobi239/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
  at Laravel\Lumen\Application->run()
     (/home/imobi239/public_html/public/index.php:38)