Skip to content

Commit

Permalink
Display error as well
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth committed Jun 19, 2024
1 parent bce846f commit bde2649
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions packages/react-components/lib/tasks/create-task.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -385,29 +385,11 @@ export function CreateTaskForm({
}
});

// for (const supportedTask of supportedTasks) {
// const definitionId = supportedTask.taskDefinitionId;
// const desc = getDefaultTaskDescription(definitionId);
// const req = getDefaultTaskRequest(definitionId);
// if (!desc) {
// console.error(`Failed to retrieve task description for definition ID: [${definitionId}]`);
// allSupportedTasksAreValid = false;
// }
// if (!req) {
// console.error(`Failed to create task request for definition ID: [${definitionId}]`);
// allSupportedTasksAreValid = false;
// }
// if (desc && req) {
// validTasks.push(supportedTask);
// }
// }
// if (!allSupportedTasksAreValid) {
// console.error('Issues found in supported task definitions');
// }

if (!defaultTaskDescription || !defaultTaskRequest) {
// We should never reach this state
console.error('Default task could not be generated, this might be a configuration error');
// We should never reach this state unless a misconfiguration happened.
const err = Error('Default task could not be generated, this might be a configuration error');
onFail && onFail(err, []);
console.error(err.message);
return <></>;
}

Expand Down

0 comments on commit bde2649

Please sign in to comment.