private function checkClientRateLimit(ResponseInterface $response)
    {
        $clientRemaining = $response->getHeaderLine('X-RateLimit-ClientRemaining');
        $clientLimit = $response->getHeaderLine('X-RateLimit-ClientLimit');

        if ('' !== $clientRemaining && $clientRemaining < 1) {
            // X-RateLimit-UserReset: Timestamp (unix epoch) for when the credits will be reset.
            $resetTime = date('Y-m-d H:i:s', $response->getHeaderLine('X-RateLimit-UserReset'));

            throw new RateLimitException('No application credits available. The limit is ' . $clientLimit . ' and will be reset at ' . $resetTime);
        }
    }