Interface ErrorHandler

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ErrorHandler
  • Method Details

    • handle

      boolean handle(HttpStatus httpStatus, ErrorResponse response)
      Handles the given error response. If a given handler is unable to handle the error, it should return false, allowing further handlers to attempt to handle the error.
      Parameters:
      httpStatus - the HTTP status code of the response
      response - the error response
      Returns:
      true if the error was handled, false otherwise
    • andThen

      default ErrorHandler andThen(@NonNull @NonNull ErrorHandler after)