private function resolveApiUrl($url)
    {
        $client = new Client([
            'defaults' => [
                'timeout' => 5,
            ],
        ]);
        $response = $client->get($url);
        $responseStatusCode = $response->getStatusCode();

        if (404 == $responseStatusCode) {
            throw new EntityNotFoundException();
        }

        if (500 == $responseStatusCode) {
            throw new HttpException('Http exception');
        }

        return $response->json(['object' => false]);
    }