src/main/php/auth/ProtectedResource.php
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());
        }
    }
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());
        }
    }
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 ( ) ) ; } }
sets proper response status code depending on exception

@param  \stubbles\webapp\auth\AuthProviderException  $ahe
@param  \stubbles\webapp\Response                    $response
sets proper response status code depending on exception