From c0bdd2215480c42d079dd3225650f22c20b12f17 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Mon, 16 Nov 2015 09:27:49 +0000 Subject: [PATCH] Updated exception reference --- examples/public/client_credentials.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/public/client_credentials.php b/examples/public/client_credentials.php index 9259c0b1..8486d31e 100644 --- a/examples/public/client_credentials.php +++ b/examples/public/client_credentials.php @@ -1,6 +1,6 @@ enableGrantType(new ClientCredentialsGrant($clientRepository, $scopeRep // App $app = new App([Server::class => $server]); -unset($app->getContainer()['errorHandler']); $app->post('/access_token', function (Request $request, Response $response) { /** @var Server $server */ $server = $this->getContainer()->get(Server::class); try { return $server->respondToRequest($request); - } catch (OAuthException $e) { + } catch (OAuthServerException $e) { return $e->generateHttpResponse(); } catch (\Exception $e) { return $response->withStatus(500)->write($e->getMessage());