Skip to content

Commit

Permalink
Task 21 : Revise GlobalExceptionHandler and GlobalExceptionHandlerTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Rapter1990 committed Jun 30, 2024
1 parent fe21ac7 commit b1a06c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ protected ResponseEntity<Object> handleRateLimitExceededException(final RateLimi
CustomError customError = CustomError.builder()
.time(LocalDateTime.now())
.httpStatus(HttpStatus.TOO_MANY_REQUESTS)
.header(CustomError.Header.VALIDATION_ERROR.getName())
.header(CustomError.Header.RATE_LIMITER_EXCEEDED_ERROR.getName())
.message(ex.getMessage())
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void givenRateLimitExceededException_whenHandleRateLimitExceededException_throwC
CustomError expectedError = CustomError.builder()
.time(LocalDateTime.now())
.httpStatus(HttpStatus.TOO_MANY_REQUESTS)
.header(CustomError.Header.VALIDATION_ERROR.getName())
.header(CustomError.Header.RATE_LIMITER_EXCEEDED_ERROR.getName())
.message("Too many requests")
.build();

Expand Down

0 comments on commit b1a06c9

Please sign in to comment.