fix undefined status code on pipe error