private getGeneralException(task: ITask): string { const generalException: any = task.getValueFor('exception'); if (generalException) { if (generalException.details && generalException.details.errors && generalException.details.errors.length) { return generalException.details.errors.join(', '); } if (generalException.details && generalException.details.error) { return generalException.details.error; } } return null; }
private getOrchestrationException(task: ITask): string { const katoTasks: any[] = task.getValueFor('kato.tasks'); if (katoTasks && katoTasks.length) { const failedTask: any = katoTasks.find(t => t.status && t.status.failed); if (!failedTask) { return null; } const steps: TaskStep[] = failedTask.history; const exception: any = failedTask.exception; if (exception) { return exception.message; } if (steps && steps.length) { return steps[steps.length - 1].status; } } return null; }