mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 01:03:13 +08:00
Fixed JsonErrorHandler and prevented AuthorizationMiddleware to eat exceptions
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user