From 5bc6914f5f7891adc73a8b4dd181bbd19bfc4641 Mon Sep 17 00:00:00 2001 From: Olivier Lamiral <olamiral@salesforce.com> Date: Wed, 26 Jun 2024 20:27:18 -0300 Subject: [PATCH] Update HttpError.java Added HTTP errors to align the available HTTP status codes --- .../extension/http/api/error/HttpError.java | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/mule-http-connector/src/main/java/org/mule/extension/http/api/error/HttpError.java b/mule-http-connector/src/main/java/org/mule/extension/http/api/error/HttpError.java index 12e533b4a..91b301442 100644 --- a/mule-http-connector/src/main/java/org/mule/extension/http/api/error/HttpError.java +++ b/mule-http-connector/src/main/java/org/mule/extension/http/api/error/HttpError.java @@ -78,7 +78,34 @@ public enum HttpError implements ErrorTypeDefinition<HttpError> { SEE_OTHER, - NOT_MODIFIED; + NOT_MODIFIED, + + PAYMENT_REQUIRED, + + PROXY_AUTHENTICATION_REQUIRED, + + REQUEST_TIMEOUT, + CONFLICT, + + GONE, + + LENGTH_REQUIRED, + + PRECONDITION_FAILED, + + REQUEST_TOO_LONG, + + REQUEST_URI_TOO_LONG, + + REQUESTED_RANGE_NOT_SATISFIABLE, + + EXPECTATION_FAILED, + + UNPROCESSABLE_ENTITY, + + NOT_IMPLEMENTED, + + HTTP_VERSION_NOT_SUPPORTED; private static Set<ErrorTypeDefinition> httpRequestOperationErrors; @@ -107,6 +134,20 @@ public enum HttpError implements ErrorTypeDefinition<HttpError> { errors.add(MOVED_TEMPORARILY); errors.add(SEE_OTHER); errors.add(NOT_MODIFIED); + errors.add(PAYMENT_REQUIRED); + errors.add(PROXY_AUTHENTICATION_REQUIRED); + errors.add(REQUEST_TIMEOUT); + errors.add(CONFLICT); + errors.add(GONE); + errors.add(LENGTH_REQUIRED); + errors.add(PRECONDITION_FAILED); + errors.add(REQUEST_TOO_LONG); + errors.add(REQUEST_URI_TOO_LONG); + errors.add(REQUESTED_RANGE_NOT_SATISFIABLE); + errors.add(EXPECTATION_FAILED); + errors.add(UNPROCESSABLE_ENTITY); + errors.add(NOT_IMPLEMENTED); + errors.add(HTTP_VERSION_NOT_SUPPORTED); httpRequestOperationErrors = unmodifiableSet(errors); }