setting the error status code on task progress