Fixed JsonErrorHandler and prevented AuthorizationMiddleware to eat exceptions

This commit is contained in:
Alejandro Celaya
2017-03-24 21:31:55 +01:00
parent f6c39285c9
commit fe7928ae0e
2 changed files with 8 additions and 20 deletions

View File

@@ -134,12 +134,6 @@ class CheckAuthenticationMiddleware implements MiddlewareInterface
} catch (AuthenticationException $e) {
$this->logger->warning('Tried to access API with an invalid JWT.' . PHP_EOL . $e);
return $this->createTokenErrorResponse();
} catch (\Exception $e) {
$this->logger->warning('Unexpected error occurred.' . PHP_EOL . $e);
return $this->createTokenErrorResponse();
} catch (\Throwable $e) {
$this->logger->warning('Unexpected error occurred.' . PHP_EOL . $e);
return $this->createTokenErrorResponse();
} finally {
ErrorHandler::clean();
}