-
Notifications
You must be signed in to change notification settings - Fork 364
Closed
Labels
Milestone
Description
Checking if a user is not assigned to an role in domain or project context returns an inconsistent response from OpenStack: Header attributes "Content-Length" and "Content-Type" indicate an non-empty json-body. But actually it is completely empty and therefore not even valid json. According to the API the correct response in that case is a 404 with no response body.
When trying to read and map the body to Map we get the following error:
org.jboss.resteasy.client.ClientResponseFailure: Unable to find a MessageBodyReader of content-type */* and type null
at org.jboss.resteasy.client.core.BaseClientResponse.createResponseFailure(BaseClientResponse.java:523)
at org.jboss.resteasy.client.core.BaseClientResponse.createResponseFailure(BaseClientResponse.java:514)
at org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:415)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:377)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:350)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:344)
at org.openstack4j.connectors.resteasy.HttpResponseImpl.readEntity(HttpResponseImpl.java:116)
at org.openstack4j.core.transport.functions.ResponseToActionResponse.apply(ResponseToActionResponse.java:31)
at org.openstack4j.core.transport.functions.ResponseToActionResponse.apply(ResponseToActionResponse.java:22)
at org.openstack4j.core.transport.HttpEntityHandler.handle(HttpEntityHandler.java:35)
at org.openstack4j.connectors.resteasy.HttpResponseImpl.getEntity(HttpResponseImpl.java:64)
at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:189)
at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:183)
at org.openstack4j.openstack.identity.internal.RoleServiceImpl.checkDomainUserRole(RoleServiceImpl.java:82)
at org.openstack4j.api.identity.KeystoneRoleServiceTests.checkDomainUserRole_fail_Test(KeystoneRoleServiceTests.java:191)
Possible workaround:
@dhague proposed upgrading the RestEasy Connector to latest to be able to use ClientResponseFilter to check for this header-body mismatch and skip mapping until this is fixed in OpenStack.