Closed pjz closed 7 years ago
If you only have ResponseMetadata in your response it probably means you got an empty response from the server. Try setting more debug logging with boto.set_stream_logger('')
and see what response body has. Mine is empty since I have no SDB resources.
As to why it has an empty response, I have no idea. You can ask questions directly related to the service on their forum https://forums.aws.amazon.com/forum.jspa?forumID=38
Honestly, I rewrote it to use DynamoDB, which had no such unwelcome surprises.
Glad you got a working solution.
Hi, I am getting this response when i am invoking my endpoint.
Not able to get the correct response.
{'ResponseMetadata': {'RequestId': '21863f68-aa40-4405-b8be-36abd9b90ef7', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '21863f68-aa40-4405-b8be-36abd9b90ef7', 'x-amzn-invoked-production-variant': 'AllTraffic', 'date': 'Sat, 1 Jun 2019 10:25:02 GMT', 'content-type': 'application/json', 'content-length': '3173'}, 'RetryAttempts': 0}, 'ContentType': 'application/json', 'InvokedProductionVariant': 'AllTraffic', 'Body': <botocore.response.StreamingBody object at 0x7f4c089e0198>}
This happens when there is no results. For example if you're using a region where there is nothing to return from the query.
Why is it okay that the docs don't specify this as a possible response? How are people supposed to build predictable handling of the return value of this function if it not explained anywhere what can be returned. I'm working on SQS client create_queue: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sqs/client/create_queue.html
The docs specifiy either return syntax of:
{
'QueueUrl': 'string'
}
OR it enumerates a list of potential exceptions.
Returning a dictionary with ResponseMetadata
is not included in either of those realities so where is this documented? I really don't understand why its satisfactory that an obscure, closed github issue thead is somehow the only place I found mention of this potential response..
Hi! I've got some code that does:
...but after getting
KeyError: 'DomainNames'
I printed outresponse
and was surprised to find it was:...any idea why that might be? The docs don't say anything about a response like that.