eruvanos / openbrokerapi

A python package for the V2 CF Service Broker API
https://openbrokerapi.readthedocs.io/
MIT License
35 stars 19 forks source link

last_operation can never send 404 ? #181

Open skippy29 opened 2 years ago

skippy29 commented 2 years ago

on last_operation:

        try:
            result = service_broker.last_operation(instance_id, operation_data)
            return to_json_response(LastOperationResponse(result.state, result.description)), HTTPStatus.OK
        except errors.ErrInstanceDoesNotExist:
            return to_json_response(LastOperationResponse(OperationState.SUCCEEDED, '')), HTTPStatus.GONE

My understanding from spec is that 410 (Gone) should be sent only for asynchronous delete operations.

This would mean that there's currently no way to differentiate a "does not exist anymore" and a "has never existed" ?