mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-07-08 05:11:33 +00:00
Compare commits
1 Commits
v0.28.0
...
fix/newstr
Author | SHA1 | Date | |
---|---|---|---|
6bfd2c7c46 |
@ -253,7 +253,7 @@ class Upgrader {
|
||||
return { stream: { ...muxedStream, ...stream }, protocol }
|
||||
} catch (err) {
|
||||
log.error('could not create new stream', err)
|
||||
throw errCode(err, codes.ERR_UNSUPPORTED_PROTOCOL)
|
||||
throw errCode(new Error('Could not create a new stream'), codes.ERR_UNSUPPORTED_PROTOCOL, { cause: err })
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -339,6 +339,7 @@ describe('Upgrader', () => {
|
||||
results.forEach(result => {
|
||||
expect(result.isRejected).to.equal(true)
|
||||
expect(result.reason.code).to.equal(codes.ERR_UNSUPPORTED_PROTOCOL)
|
||||
expect(result.reason.cause).to.exist()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user