Handle Errno::EPIPE when writing responses