mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-23 14:01:35 +00:00
fix: make error codes consistent (#1054)
Sometimes they are `NOT_FOUND`, sometimes `ERR_NOT_FOUND`, etc. Move all error codes into `errors.js` and reference them from there.
This commit is contained in:
@ -297,7 +297,7 @@ class Upgrader {
|
||||
maConn.timeline.upgraded = Date.now()
|
||||
|
||||
const errConnectionNotMultiplexed = () => {
|
||||
throw errCode(new Error('connection is not multiplexed'), 'ERR_CONNECTION_NOT_MULTIPLEXED')
|
||||
throw errCode(new Error('connection is not multiplexed'), codes.ERR_CONNECTION_NOT_MULTIPLEXED)
|
||||
}
|
||||
|
||||
// Create the connection
|
||||
|
Reference in New Issue
Block a user