Class BffLoginExceptionHandler

java.lang.Object
com.irurueta.authserver.bff.api.web.login.BffLoginExceptionHandler

@RestControllerAdvice(assignableTypes=BffLoginController.class) public class BffLoginExceptionHandler extends Object
Answers a login request whose parameters break the constraints of the contract (returnTo too long, acrValues of the wrong format, maxAge out of range) with 400, as the contract declares: the validation of the generated interface throws a ConstraintViolationException, which would otherwise be a 500. Like the other 400 of the login, the answer has no body.
  • Constructor Details

    • BffLoginExceptionHandler

      public BffLoginExceptionHandler()
  • Method Details

    • handleInvalidParameter

      @ExceptionHandler(jakarta.validation.ConstraintViolationException.class) public org.springframework.http.ResponseEntity<Void> handleInvalidParameter(jakarta.validation.ConstraintViolationException exception)
      Answers a parameter that breaks the constraints of the contract.
      Parameters:
      exception - the failure.
      Returns:
      an empty 400 answer.