Skip to content

Commit

Permalink
print exception stack trace
Browse files Browse the repository at this point in the history
  • Loading branch information
arikalon1 authored and pavangudiwada committed May 30, 2024
1 parent e2f9bb5 commit b9d2389
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions playbooks/robusta_playbooks/krr.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,15 +352,15 @@ def krr_scan(event: ExecutionBaseEvent, params: KRRParams):
except json.JSONDecodeError:
logging.error(f"*KRR scan job failed. Expecting json result.*\n\n Result:\n{logs}")
return
except ValidationError as e:
logging.error(f"*KRR scan job failed. Result format issue.*\n\n {e}")
except ValidationError:
logging.error("*KRR scan job failed. Result format issue.*\n\n", exc_info=True)
logging.error(f"\n {logs}")
return
except Exception as e:
if str(e) == "Failed to reach wait condition":
logging.error(f"*KRR scan job failed. The job wait condition timed out ({params.timeout}s)*")
logging.error(f"*KRR scan job failed. The job wait condition timed out ({params.timeout}s)*", exc_info=True)
else:
logging.error(f"*KRR scan job unexpected error.*\n {e}")
logging.error(f"*KRR scan job unexpected error.*\n {e}", exc_info=True)
return

scan_block = ScanReportBlock(
Expand Down

0 comments on commit b9d2389

Please sign in to comment.