Set state to error instead of completed