diff --git a/semanticscholar/ApiRequester.py b/semanticscholar/ApiRequester.py index 20b3d2b..413839d 100644 --- a/semanticscholar/ApiRequester.py +++ b/semanticscholar/ApiRequester.py @@ -78,5 +78,8 @@ 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: + data = r.json() + raise Exception(data['message']) return data