Introduced TASK_ERROR for unrecoverable errors

Review: https://reviews.apache.org/r/27685