mirror of
https://github.com/sprockets/sprockets.clients.dynamodb.git
synced 2024-11-23 11:19:54 +00:00
HTTPError.message is not a thing
This commit is contained in:
parent
a81aaa02d0
commit
472684366f
2 changed files with 5 additions and 3 deletions
|
@ -4,7 +4,7 @@ except ImportError as error:
|
||||||
def DynamoDB(*args, **kwargs):
|
def DynamoDB(*args, **kwargs):
|
||||||
raise error
|
raise error
|
||||||
|
|
||||||
version_info = (0, 2, 0)
|
version_info = (0, 2, 1)
|
||||||
__version__ = '.'.join(str(v) for v in version_info)
|
__version__ = '.'.join(str(v) for v in version_info)
|
||||||
|
|
||||||
# Response constants
|
# Response constants
|
||||||
|
|
|
@ -104,8 +104,9 @@ class DynamoDB(object):
|
||||||
if http_err.code == 599:
|
if http_err.code == 599:
|
||||||
future.set_exception(exceptions.TimeoutException())
|
future.set_exception(exceptions.TimeoutException())
|
||||||
else:
|
else:
|
||||||
|
|
||||||
future.set_exception(
|
future.set_exception(
|
||||||
exceptions.RequestException(http_err.message))
|
exceptions.RequestException(http_err.response.body))
|
||||||
except Exception as exception:
|
except Exception as exception:
|
||||||
future.set_exception(exception)
|
future.set_exception(exception)
|
||||||
else:
|
else:
|
||||||
|
@ -126,7 +127,8 @@ class DynamoDB(object):
|
||||||
if err.code == 599:
|
if err.code == 599:
|
||||||
future.set_exception(exceptions.TimeoutException())
|
future.set_exception(exceptions.TimeoutException())
|
||||||
else:
|
else:
|
||||||
future.set_exception(exceptions.RequestException(err.message))
|
future.set_exception(
|
||||||
|
exceptions.RequestException(err.response.body))
|
||||||
else:
|
else:
|
||||||
ioloop.IOLoop.current().add_future(aws_response, handle_response)
|
ioloop.IOLoop.current().add_future(aws_response, handle_response)
|
||||||
return future
|
return future
|
||||||
|
|
Loading…
Reference in a new issue