stream ends when error is emitted, regardless of whether stream emits end