Skip to content

Commit

Permalink
feat: add support for 504 error
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnsilva committed Jan 23, 2023
1 parent 1d74d22 commit ec23182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion semanticscholar/ApiRequester.py
Expand Up @@ -78,7 +78,7 @@ def get_data(
raise ObjectNotFoundExeception(data['error'])
elif r.status_code == 429:
raise ConnectionRefusedError('HTTP status 429 Too Many Requests.')
elif r.status_code == 500:
elif r.status_code in [500, 504]:
data = r.json()
raise Exception(data['message'])

Expand Down

0 comments on commit ec23182

Please sign in to comment.