close response stream

in case of 500 or 404 close the httpexchange.