add test for stream error