diff --git a/shodan/client.py b/shodan/client.py index db50b4c..f4aebc0 100644 --- a/shodan/client.py +++ b/shodan/client.py @@ -336,6 +336,8 @@ def _request(self, function, params, service='shodan', method='get'): raise APIError(error) elif data.status_code == 403: raise APIError('Access denied (403 Forbidden)') + elif data.status_code == 502: + raise APIError('Bad Gateway (502)') # Parse the text into JSON try: