stream object emits error