fix http stream error handling