#13334: Capture exception class when recording job error

This commit is contained in:
Jeremy Stretch
2023-12-01 10:54:46 -05:00
parent 0340a5e8d6
commit 0c9919a5e8
4 changed files with 5 additions and 5 deletions

View File

@@ -527,7 +527,7 @@ def run_script(data, job, request=None, commit=True, **kwargs):
logger.error(f"Exception raised during script execution: {e}")
script.log_info("Database changes have been reverted due to error.")
job.data = ScriptOutputSerializer(script).data
job.terminate(status=JobStatusChoices.STATUS_ERRORED, error=str(e))
job.terminate(status=JobStatusChoices.STATUS_ERRORED, error=repr(e))
if request:
clear_events.send(request)