diff --git a/src/main/java/com/czertainly/ca/connector/ejbca/ExceptionHandlingAdvice.java b/src/main/java/com/czertainly/ca/connector/ejbca/ExceptionHandlingAdvice.java index 13c2ffe..417a4d2 100644 --- a/src/main/java/com/czertainly/ca/connector/ejbca/ExceptionHandlingAdvice.java +++ b/src/main/java/com/czertainly/ca/connector/ejbca/ExceptionHandlingAdvice.java @@ -146,9 +146,9 @@ public ErrorMessageDto handleMessageNotReadable(CertificateRequestException ex) * @return */ @ExceptionHandler(RuntimeException.class) - @ResponseStatus(HttpStatus.UNPROCESSABLE_ENTITY) + @ResponseStatus(HttpStatus.BAD_REQUEST) public ErrorMessageDto handleRuntimeException(RuntimeException ex) { - LOG.info("HTTP 422: {}", ex.getMessage()); + LOG.info("HTTP 400: {}", ex.getMessage()); return ErrorMessageDto.getInstance(ex.getMessage()); }