overwatch
overwatch copied to clipboard
[FEAT] - Missing job failed details in audit log
The detailed job run failures are not available in the audit data.
To Do: Calling an API with task_run_id or run_id as parameter to get the failure message.
def job_error(self, runid):
self.run_id = runid
self.url = f"https://{self.host_name}/api/2.1/jobs/runs/get-output?run_id={self.run_id}"
response = requests.get(self.url, headers=self.headers)
try:
output = response.json()["error"]
return output
except KeyError:
return "No Error message found"
except Exception as e:
print(f"An exception occurred : {e}")