Bugfix/exception handling in user authorization (#4015)

* Add guard

* Update changelog
pull/4019/head
Thomas Kaul 3 weeks ago committed by GitHub
parent c857bd1b2e
commit a1fbdc2ebe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Fixed
- Improved the exception handling in the user authorization service
## 2.121.1 - 2024-11-02 ## 2.121.1 - 2024-11-02
### Added ### Added

@ -60,7 +60,7 @@ export class JwtStrategy extends PassportStrategy(Strategy, 'jwt') {
); );
} }
} catch (error) { } catch (error) {
if (error?.getStatus() === StatusCodes.TOO_MANY_REQUESTS) { if (error?.getStatus?.() === StatusCodes.TOO_MANY_REQUESTS) {
throw error; throw error;
} else { } else {
throw new HttpException( throw new HttpException(

Loading…
Cancel
Save