catch anything here

This commit is contained in:
Thomas Steen Rasmussen 2017-04-08 10:50:51 +02:00
parent 809e22311d
commit e5215830b0

View file

@ -601,10 +601,10 @@ class CoinifyCallbackView(SingleObjectMixin, View):
if key[:5] == 'HTTP_':
headerdict[key[5:]] = value
# parse json
# attempt to parse json
try:
parsed = json.loads(str(request.body))
except JSONDecodeError:
except Exception as E:
parsed = None
# save callback to db