private function handleAuthProviderException(AuthProviderException $ahe, Response $response)
    {
        if ($ahe->isInternal()) {
            $this->error = $response->internalServerError($ahe);
        } else {
            $response->setStatusCode($ahe->getCode());
            $this->error = new Error($ahe->getMessage());
        }
    }