Browse Source
Bugfix/exception handling in user authorization (#4015)
* Add guard
* Update changelog
pull/4019/head
Thomas Kaul
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
7 additions and
1 deletions
-
CHANGELOG.md
-
apps/api/src/app/auth/jwt.strategy.ts
|
|
@ -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/), |
|
|
|
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 |
|
|
|
|
|
|
|
### Added |
|
|
|
|
|
@ -60,7 +60,7 @@ export class JwtStrategy extends PassportStrategy(Strategy, 'jwt') { |
|
|
|
); |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
if (error?.getStatus() === StatusCodes.TOO_MANY_REQUESTS) { |
|
|
|
if (error?.getStatus?.() === StatusCodes.TOO_MANY_REQUESTS) { |
|
|
|
throw error; |
|
|
|
} else { |
|
|
|
throw new HttpException( |
|
|
|