format error handler in newTask