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());