Closed chourasiya closed 4 years ago
Are you referring to the provisioning response codes seen here? https://github.com/openservicebrokerapi/servicebroker/blob/v2.15/spec.md#response-3
In the case you described, I believe the following is the correct response:
409 Conflict - MUST be returned if a Service Instance with the same id already exists or is being provisioned but with different attributes.
To return a 409, you may throw a ServiceInstanceExistsException
.
This should answer the question, so I'm closing the issue. But feel free to reopen if you need more information.
@royclarkson As you can see in below url there are 400 response status as well : https://github.com/openservicebrokerapi/servicebroker/blob/v2.15/spec.md#response-3
I just wanted to know which class i have to use to throw 400 status code.
Thanks for clarifying. You can use the ServiceBrokerInvalidParametersException
to return a 400 response. Generally, you can review the ServiceBrokerExceptionHandler or its subclasses to see what response is returned for which exception.
@royclarkson Hi can you tell me witch class i have to use to throw 410 status code in case of unbind service broker endpoint.
Find more details in below url : https://github.com/openservicebrokerapi/servicebroker/blob/v2.15/spec.md#unbinding
@chourasiya please see ServiceInstanceBindingDoesNotExistException
Hello team, I am implementing the service broker using Spring.
I have provided an implementation class for CreateServiceInstanceService. In this, according to the OSBAPI specification given here If someone provides already existing instanceId but with different attributes, we should throw 400 status. But I am unable to find a way to achieve this. Will you please help me out.
Can Anyone help me which class i have to use to throw 400 BAD Request.
Thanks.