This commit is contained in:
Graham Campbell 2015-06-18 22:45:27 +01:00
parent e1681a7021
commit 7578b640bd

View File

@ -70,7 +70,7 @@ class RedirectDisplayer implements DisplayerInterface
*/
public function canDisplay(Exception $exception)
{
$redirect = $exception instanceof HttpExceptionInterface && $exception->getCode() === 401;
$redirect = $exception instanceof HttpExceptionInterface && $exception->getStatusCode() === 401;
return $redirect && !$this->request->is('api*');
}