Skip to content

Commit

Permalink
one more place where a missing error response could do harm
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Jun 23, 2020
1 parent 4262a2b commit 9dcb55f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CloudFlare/cloudflare.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,10 @@ def _call(self, method, headers, parts,
response_data['success'] = True

if response_data['success'] is False:
errors = response_data['errors'][0]
if 'errors' in response_data:
errors = response_data['errors'][0]
else:
errors = {}
if 'code' in errors:
code = errors['code']
else:
Expand Down

0 comments on commit 9dcb55f

Please sign in to comment.