Description
Describe the bug
I came across a response from the government cloud (I tried to initiate an RTR session), and the response was as follows:
Status code: 403
Content type: text/plain
Content: Remote response feature is not enabled
The issue is that this error is not returned to the calling code because on line #289, it assumes the response is in JSON.
Eventually, it falls back to "No content was received for this request.".
I am not sure how to actually fix this. I assume the text/plain is somewhat backward compatibility code for older instances of CrowdStrike. I would suggest either fixing this in the backend (@jshcodes, I assume you have the ability to make this happen) or fallback to create the Result
object with somewhat this format "errors": [{"message": response.text, "code": response.status_code}]
, Timeouts act in a similar way.
Environment (please complete the following information):
- OS: MacOS
- Python: 3.11
- FalconPy: 1.4.3