Skip to content
Snippets Groups Projects
Commit 969fb560 authored by jurgenhaas's avatar jurgenhaas
Browse files

Merge pull request #5 from tamsky/tamsky-patch-1

catch KeyErrors in error formatter
parents e9f2998d 5e59da36
No related branches found
No related tags found
No related merge requests found
......@@ -208,10 +208,13 @@ class ActionModule(object):
msg = content['message']
if content['errors']:
for error in content['errors']:
if error['message']:
msg += ' // ' + error['message']
if error['description']:
msg += ' // ' + error['description']
try:
if error['message']:
msg += ' // ' + error['message']
if error['description']:
msg += ' // ' + error['description']
except KeyError:
continue
raise ae('%s' % msg)
return content
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment