Skip to content

Commit

Permalink
refactor: fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Oct 23, 2021
1 parent ba95037 commit 1c6c890
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions biosimulators_utils/biosimulations/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ def validate_biosimulations_api_response(response, failure_introductory_message)

except requests.RequestException as exception:
try:
errors = response.json()['errors']
except simplejson.errors.JSONDecodeError:
raise
errors = response.json()['error']
except (simplejson.errors.JSONDecodeError, KeyError):
raise exception

error_messages = []
for error in errors:
Expand Down

0 comments on commit 1c6c890

Please sign in to comment.