From 69888b6b7100d42f85df2430a04048dde054f261 Mon Sep 17 00:00:00 2001 From: "Gavin M. Roy" Date: Thu, 24 Mar 2016 16:36:49 -0400 Subject: [PATCH] Wrong exception --- sprockets/clients/dynamodb/connector.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sprockets/clients/dynamodb/connector.py b/sprockets/clients/dynamodb/connector.py index 1bdf430..89a4393 100644 --- a/sprockets/clients/dynamodb/connector.py +++ b/sprockets/clients/dynamodb/connector.py @@ -104,9 +104,10 @@ class DynamoDB(object): if http_err.code == 599: future.set_exception(exceptions.TimeoutException()) else: - response_reason = err.code - if err.response and hasattr(err.response, 'body'): - response_reason = err.response.body + response_reason = http_err.code + if http_err.response and \ + hasattr(http_err.response, 'body'): + response_reason = http_err.response.body future.set_exception(response_reason) except Exception as exception: future.set_exception(exception)