Class ServiceInstanceDoesNotExistException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.cloud.servicebroker.exception.ServiceBrokerException
org.springframework.cloud.servicebroker.exception.ServiceInstanceDoesNotExistException
- All Implemented Interfaces:
Serializable
Thrown to indicate that a request includes a service instance ID that is not known to
the service broker.
Throwing this exception will result in different HTTP status codes being returned to the platform, depending on the condition. The default HTTP status code is 422 UNPROCESSABLE ENTITY. If this exception is thrown when retrieving a service instance or service instance binding, an HTTP status 404 NOT FOUND is returned. If this exception is thrown when deleting a service instance, an HTTP status 410 GONE is returned.
- Author:
- S Greenberg, Scott Frederick, Roy Clarkson
- See Also:
-
Constructor Summary
ConstructorDescriptionServiceInstanceDoesNotExistException
(String serviceInstanceId) Construct an exception with a default message that includes the provided service instance ID.ServiceInstanceDoesNotExistException
(String errorCode, String serviceInstanceId) Construct an exception with an error code and default message that includes the provided service instance ID.ServiceInstanceDoesNotExistException
(String errorCode, String serviceInstanceId, Boolean instanceUsable, Boolean updateRepeatable) Construct an exception with a default message and the provided detail and a cause.ServiceInstanceDoesNotExistException
(String errorCode, String serviceInstanceId, Boolean instanceUsable, Boolean updateRepeatable, Throwable cause) Construct an exception with a default message and the provided detail and a cause. -
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
-
ServiceInstanceDoesNotExistException
Construct an exception with a default message that includes the provided service instance ID.- Parameters:
serviceInstanceId
- the service instance ID
-
ServiceInstanceDoesNotExistException
Construct an exception with an error code and default message that includes the provided service instance ID.- Parameters:
errorCode
- a single word in camel case that uniquely identifies the error conditionserviceInstanceId
- the service instance ID
-
ServiceInstanceDoesNotExistException
public ServiceInstanceDoesNotExistException(String errorCode, String serviceInstanceId, Boolean instanceUsable, Boolean updateRepeatable) Construct an exception with a default message and the provided detail and a cause.- Parameters:
errorCode
- a single word in camel case that uniquely identifies the error conditionserviceInstanceId
- the service instance IDinstanceUsable
- if an update or deprovisioning operation failed, this flag indicates whether or not the Service Instance is still usable. If true, the Service Instance can still be used, false otherwise. This field MUST NOT be present for errors of other operations.updateRepeatable
- if an update operation failed, this flag indicates whether this update can be repeated or not. If true, the same update operation MAY be repeated and MAY succeed; if false, repeating the same update operation will fail again. This field MUST NOT be present for errors of other operations.
-
ServiceInstanceDoesNotExistException
public ServiceInstanceDoesNotExistException(String errorCode, String serviceInstanceId, Boolean instanceUsable, Boolean updateRepeatable, Throwable cause) Construct an exception with a default message and the provided detail and a cause.- Parameters:
errorCode
- a single word in camel case that uniquely identifies the error conditionserviceInstanceId
- the service instance IDinstanceUsable
- if an update or deprovisioning operation failed, this flag indicates whether or not the Service Instance is still usable. If true, the Service Instance can still be used, false otherwise. This field MUST NOT be present for errors of other operations.updateRepeatable
- if an update operation failed, this flag indicates whether this update can be repeated or not. If true, the same update operation MAY be repeated and MAY succeed; if false, repeating the same update operation will fail again. This field MUST NOT be present for errors of other operations.cause
- the cause of the exception
-