Class ProviderApiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.broadleafcommerce.cartoperation.exception.ProviderApiException
- All Implemented Interfaces:
Serializable
Defines a generic error that can be thrown in response to receiving an error from an API that one
of the providers (e.g.,
CatalogProvider) received. This allows the error to bubble up to
the local endpoint and be returned.- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionProviderApiException(String message, Throwable cause, org.springframework.web.reactive.function.client.WebClientException receivedException) ProviderApiException(String message, org.springframework.web.reactive.function.client.WebClientException receivedException) ProviderApiException(Throwable cause, org.springframework.web.reactive.function.client.WebClientException receivedException) ProviderApiException(org.springframework.web.reactive.function.client.WebClientException receivedException) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.web.reactive.function.client.WebClientExceptionThe received error.org.springframework.http.HttpStatusCodeMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ProviderApiException
public ProviderApiException(org.springframework.web.reactive.function.client.WebClientException receivedException) -
ProviderApiException
public ProviderApiException(String message, org.springframework.web.reactive.function.client.WebClientException receivedException) -
ProviderApiException
-
ProviderApiException
public ProviderApiException(Throwable cause, org.springframework.web.reactive.function.client.WebClientException receivedException)
-
-
Method Details
-
getStatus
public org.springframework.http.HttpStatusCode getStatus()- Returns:
- The status code of the received error, if available.
-
getResponseBodyAsString
- Returns:
- The body of the received error, if available.
-
getCauseMessage
-
getRequestErrorType
-
getReceivedException
public org.springframework.web.reactive.function.client.WebClientException getReceivedException()The received error.- Returns:
- The received error.
-