Bugfix/exception handling in user authorization (#4015)
* Add guard * Update changelog
This commit is contained in:
parent
c857bd1b2e
commit
a1fbdc2ebe
@ -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…
x
Reference in New Issue
Block a user