Deal with request emitting "end" even after a error.