Skip to content

Commit

Permalink
modify 400 bad request size
Browse files Browse the repository at this point in the history
  • Loading branch information
noemil12 committed Nov 28, 2023
1 parent 7af8a59 commit 81a1100
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ public Mono<ResponseEntity<Problem>> handleResponseEntityException(final PDNDGen
log.warn(exception.toString());

final Problem problem = new Problem();
if (exception.getExceptionType() == ExceptionTypeEnum.SIGNALID_ALREADY_EXISTS) {
if (exception.getExceptionType() == ExceptionTypeEnum.SIGNALID_ALREADY_EXISTS || exception.getExceptionType() == ExceptionTypeEnum.SIZE_NOT_VALID ) {
problem.setTitle(HttpStatus.BAD_REQUEST.name());
problem.setDetail(HttpStatus.valueOf(HttpStatus.BAD_REQUEST.value()).getReasonPhrase());
} else {
}else {
problem.setTitle(HttpStatus.FORBIDDEN.name());
problem.setDetail(HttpStatus.valueOf(HttpStatus.FORBIDDEN.value()).getReasonPhrase());
}
Expand Down

0 comments on commit 81a1100

Please sign in to comment.