Error 400 does not have response
lunne opened this issue · 1 comments
lunne commented
Im not getting the reponse from the raised error as expected.
e.response is "400 BAD REQUEST"
try:
data = self.client.object.postObject(body=kwargs).result()
except HTTPBadRequest as e:
# In this case, the raw HTTP response is only available in the exception object
r = e.response
When the api returns a 400 the response body is this but this is not included in the raised error:
{
"message": "Object xxx already exists. Please change the object number"
}
this is the client config:
bravado_config = {
'validate_swagger_spec': True,
'validate_requests': False,
'validate_responses': False,
'use_models': True,
'also_return_response': False
}
lunne commented
This was not an issue.. I must have done something wrong..