Enhance the check_execution_status method by adding validation for responses before attempting to parse them with response.json. This will ensure more robust error handling and prevent issues with invalid or null responses.
Requirements
- Verify the response status code after
requests.get.
- Check for
None or empty response content before calling response.json.
- Would be better a status code check here.
- Implement appropriate logging or error handling if the
response is invalid.
Enhance the check_execution_status method by adding validation for responses before attempting to parse them with response.json. This will ensure more robust error handling and prevent issues with invalid or null responses.
Requirements
requests.get.Noneoremptyresponse content before callingresponse.json.responseis invalid.