Class ServiceBrokerApiVersionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.cloud.servicebroker.exception.ServiceBrokerException
org.springframework.cloud.servicebroker.exception.ServiceBrokerApiVersionException
- All Implemented Interfaces:
Serializable
Thrown to indicate that the version of the API supported by the broker doesn't match
the version provided by the platform.
Throwing this exception will result in an HTTP status code 412 PRECONDITION FAILED being returned to the platform.
- Author:
- Scott Frederick
- See Also:
-
Constructor Summary
ConstructorDescriptionServiceBrokerApiVersionException
(String expectedVersion, String providedVersion) Construct an exception with the expected and provided versions.ServiceBrokerApiVersionException
(String errorCode, String expectedVersion, String providedVersion) Construct an exception with an error code and the expected and provided versions. -
Method Summary
Methods inherited from class org.springframework.cloud.servicebroker.exception.ServiceBrokerException
getErrorMessage
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ServiceBrokerApiVersionException
Construct an exception with the expected and provided versions.- Parameters:
expectedVersion
- the version expected by the service brokerprovidedVersion
- the version provided by the platform
-
ServiceBrokerApiVersionException
public ServiceBrokerApiVersionException(String errorCode, String expectedVersion, String providedVersion) Construct an exception with an error code and the expected and provided versions.- Parameters:
errorCode
- a single word in camel case that uniquely identifies the error conditionexpectedVersion
- the version expected by the service brokerprovidedVersion
- the version provided by the platform
-