Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Exception Message to Taks Notification Email #43666

Open
wants to merge 12 commits into
base: 5.1-dev
Choose a base branch
from
Prev Previous commit
Next Next commit
Added trace string
This information in lost after task completion
  • Loading branch information
brbrbr committed Jun 18, 2024
commit 7d828babe23453470fd152ddf9c2413318ce1d99
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,13 @@ private function getDataFromTask(Task $task): array
'EXIT_CODE' => $task->getContent()['status'] ?? Status::NO_EXIT,
'EXEC_DATE_TIME' => $lockOrExecTime,
'TASK_OUTPUT' => $task->getContent()['output_body'] ?? '',
'TASK_EXCEPTION' => $task->getContent()['exception']?->getMessage() ?? '',
// this might rersult in one or two empty strings with new Lines. Not too visible in email or html
// so not really worth the effort to add a lot of extra code to optimize this
'TASK_EXCEPTION' => ($task->getContent()['exception']?->getMessage() ?? '')
."\n\n".
Path::removeRoot($task->getContent()['exception']?->getTraceAsString() ?? '')
,

];
}

Expand Down