-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Hello, I have an unhandled error with the following code:
const { once, Readable } = require('stream')
const miss = require('mississippi')
const through = require('through')
const createStream = (content) => {
const s = new Readable()
s._read = () => {}
s.push(content)
s.push(null)
return s
}
;(async function () {
const transform = through(function () {
transform.emit('error', new Error('Invalid JSON (Unexpected "m" at position 1 in state STOP)'))
})
const source = createStream('<message>No Feed.</message>')
source.on('error', () => {
console.log('handled')
})
const stream = miss.pipeline.obj(source, transform)
const error = await once(stream, 'error')
console.log(error)
})()Node: v14.5.0
through: 2.3.8
pumpify: 1.5.1
Note: I've run into this issue while using mississippi,pipeline.obj with JSONStream (see error here)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels