Package io.camunda.zeebe.gateway.rest
Class RestErrorMapper
java.lang.Object
io.camunda.zeebe.gateway.rest.RestErrorMapper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Function<BrokerRejection, org.springframework.http.ProblemDetail> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.http.ProblemDetailcreateProblemDetail(org.springframework.http.HttpStatusCode status, String detail, String title) static <T> Optional<org.springframework.http.ResponseEntity<T>> getResponse(Throwable error, Function<BrokerRejection, org.springframework.http.ProblemDetail> rejectionMapper) static org.springframework.http.ProblemDetailstatic org.springframework.http.ResponseEntity<Object> static org.springframework.http.ProblemDetailmapErrorToProblem(Throwable error, Function<BrokerRejection, org.springframework.http.ProblemDetail> rejectionMapper) static <T> CompletableFuture<org.springframework.http.ResponseEntity<T>> mapProblemToCompletedResponse(org.springframework.http.ProblemDetail problemDetail) static <T> org.springframework.http.ResponseEntity<T> mapProblemToResponse(org.springframework.http.ProblemDetail problemDetail) static org.springframework.http.ResponseEntity<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
-
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
-
mapDocumentHandlingExceptionToProblem
public static org.springframework.http.ProblemDetail mapDocumentHandlingExceptionToProblem(DocumentServices.DocumentException e) -
mapDocumentHandlingExceptionToResponse
public static org.springframework.http.ResponseEntity<Object> mapDocumentHandlingExceptionToResponse(DocumentServices.DocumentException e)
-