Fix error handling in sterm-urlpipe