Skip to content
This repository has been archived by the owner on Jun 15, 2019. It is now read-only.

Commit

Permalink
Improve 3rdMan exception logging
Browse files Browse the repository at this point in the history
  • Loading branch information
codeinthehole committed Mar 14, 2014
1 parent dc8c9ba commit 0515f2b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions datacash/the3rdman/views.py
Expand Up @@ -25,10 +25,11 @@ def post(self, request, *args, **kwargs):
if '<?xml' in request.body:
response = models.FraudResponse.create_from_xml(request.body)
else:
response = models.FraudResponse.create_from_querystring(request.body)
except Exception, e:
logger.error("Error raised handling response:\n%s", request.body)
logger.exception(e)
response = models.FraudResponse.create_from_querystring(
request.body)
except Exception:
logger.error("Error raised handling response:\n%s", request.body,
exc_info=True)
return http.HttpResponseServerError("error")
else:
logger.info("Successful response received with merchant ref %s",
Expand Down

0 comments on commit 0515f2b

Please sign in to comment.