-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Need to adjust handle_response logic to account for 502 responses. It appears Threat Stack sends back and HTML response for 502s.
Example:
{'_content': b'
502 Bad Gateway
\nThe server returned an invalid or incomplete response.\n\n', '_content_consumed': True, '_next': None, 'status_code': 502, 'headers': {'Cache-Control': 'no-cache', 'Connection': 'close', 'Content-Type': 'text/html'}, 'raw': <urllib3.response.HTTPResponse object at 0x10e3c52e8>, 'url': 'https://app.threatstack.com/api/v1/alerts?count=100&page=3', 'encoding': 'ISO-8859-1', 'history': [], 'reason': 'Bad Gateway', 'cookies': <RequestsCookieJar[]>, 'elapsed': datetime.timedelta(0, 120, 144756), 'request': <PreparedRequest [GET]>, 'connection': <requests.adapters.HTTPAdapter object at 0x10e3c5c50>}Metadata
Metadata
Assignees
Labels
No labels