protected function generateCSRFToken()
    {
        try {
            parent::generateCSRFToken();
        } catch (ClientException $e) {
            // too many request, sleep for a while
            if ($e->getCode() === 429) {
                throw new EndomondoApiException('Too many requests', $e->getCode(), $e);
            }

            throw new EndomondoApiException($e->getMessage(), $e->getCode(), $e);
        }
    }