Skip to content

Commit

Permalink
#259 [feat] too many request 예외처리
Browse files Browse the repository at this point in the history
  • Loading branch information
sohyundoh committed May 9, 2024
1 parent 3702ca3 commit 96556e8
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.asap.server.exception.model.HostTimeForbiddenException;
import com.asap.server.exception.model.InternalErrorException;
import com.asap.server.exception.model.NotFoundException;
import com.asap.server.exception.model.TooManyRequestException;
import com.asap.server.exception.model.UnauthorizedException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.validation.ConstraintViolationException;
Expand Down Expand Up @@ -134,6 +135,14 @@ protected ErrorResponse handleConflictException(final ConflictException e) {
return ErrorResponse.error(e.getError());
}

/*
* 429 Too Many Requests
*/
@ResponseStatus(HttpStatus.TOO_MANY_REQUESTS)
@ExceptionHandler(TooManyRequestException.class)
protected ErrorResponse handleTooManyConflictException(final TooManyRequestException e) {
return ErrorResponse.error(e.getError());
}

/**
* 500 Internal Server
Expand Down

0 comments on commit 96556e8

Please sign in to comment.