Worked on error handling on the task side