Class ExceptionBuilder

java.lang.Object
com.unosquare.carmigo.exception.ExceptionBuilder

public class ExceptionBuilder extends Object
Builder an error exception.
  • Constructor Details

    • ExceptionBuilder

      public ExceptionBuilder()
  • Method Details

    • buildErrorResponseRepresentation

      public static org.springframework.http.ResponseEntity<ErrorResponse> buildErrorResponseRepresentation(org.springframework.http.HttpStatus httpStatus, String message)
      Builds an error response.
      Parameters:
      httpStatus - the error HttpStatus.
      message - what happened.
      Returns:
      a ResponseEntity.