Oops pipe input error handling

I forgot to account for an input error handling. Although this is done
by the Python bindings, we still want to make sure the C components are
still correct.