Class RestErrorMapper

java.lang.Object
io.camunda.zeebe.gateway.rest.RestErrorMapper

public class RestErrorMapper extends Object
  • Field Details

    • DEFAULT_REJECTION_MAPPER

      public static final Function<BrokerRejection,org.springframework.http.ProblemDetail> DEFAULT_REJECTION_MAPPER
  • Constructor Details

    • RestErrorMapper

      public RestErrorMapper()
  • Method Details

    • getResponse

      public static <T> Optional<org.springframework.http.ResponseEntity<T>> getResponse(Throwable error, Function<BrokerRejection,org.springframework.http.ProblemDetail> rejectionMapper)
    • mapErrorToProblem

      public static org.springframework.http.ProblemDetail mapErrorToProblem(Throwable error, Function<BrokerRejection,org.springframework.http.ProblemDetail> rejectionMapper)
    • createProblemDetail

      public static org.springframework.http.ProblemDetail createProblemDetail(org.springframework.http.HttpStatusCode status, String detail, String title)
    • mapProblemToResponse

      public static <T> org.springframework.http.ResponseEntity<T> mapProblemToResponse(org.springframework.http.ProblemDetail problemDetail)
    • mapProblemToCompletedResponse

      public static <T> CompletableFuture<org.springframework.http.ResponseEntity<T>> mapProblemToCompletedResponse(org.springframework.http.ProblemDetail problemDetail)
    • mapUserManagementExceptionsToResponse

      public static org.springframework.http.ResponseEntity<Object> mapUserManagementExceptionsToResponse(Exception e)
    • mapDocumentHandlingExceptionToProblem

      public static org.springframework.http.ProblemDetail mapDocumentHandlingExceptionToProblem(DocumentServices.DocumentException e)
    • mapDocumentHandlingExceptionToResponse

      public static org.springframework.http.ResponseEntity<Object> mapDocumentHandlingExceptionToResponse(DocumentServices.DocumentException e)