Skip to content

Commit f29e868

Browse files
committed
also log the request data
1 parent a9f4f85 commit f29e868

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dj_elastictranscoder/views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ def endpoint(request):
2020
"""
2121
Receive SNS notification
2222
"""
23+
request_data = request.read()
2324
try:
2425
try:
25-
data = json.loads(request.read())
26+
data = json.loads(request_data)
2627
except ValueError:
2728
return HttpResponseBadRequest('Invalid JSON')
2829

@@ -74,5 +75,5 @@ def endpoint(request):
7475

7576
return HttpResponse('Done')
7677
except Exception, e:
77-
logger.exception("'%s' exception was raised processing the endpoint view." % e.__class__.__name__)
78+
logger.exception("'%s' exception was raised processing the endpoint view. Posted data was as follows: '%s'" % (e.__class__.__name__, request_data))
7879
raise

0 commit comments

Comments
 (0)