You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def create_resource_under_resource
...
rescue HawkularException => error
# 409 We already exist -> that is ok
raise unless error.status_code == 409
end
Resource.new(res)
In case of the 409, we still return a Resource, but constructed from the input, which does not contain the path.
The path needs to be obtained by clients like this:
resource = @inv_client.create_resource type_path, data['r'], data['r']
if resource.path.nil?
resources = @inv_client.list_resources_for_type type_path, true
resource = resources.first
end
We should perhaps internalise getting the path into create_resource to have a consistent behaviour in both cases.
The text was updated successfully, but these errors were encountered:
This goes
In case of the 409, we still return a
Resource
, but constructed from the input, which does not contain the path.The path needs to be obtained by clients like this:
We should perhaps internalise getting the path into
create_resource
to have a consistent behaviour in both cases.The text was updated successfully, but these errors were encountered: