Browse Source

swap bad command and invalid token errors

session-estimator
Mathias Buus 3 years ago
parent
commit
6c31ac3040
  1. 2
      index.js
  2. 4
      lib/errors.js

2
index.js

@ -582,8 +582,8 @@ class DHT extends EventEmitter {
}
DHT.ERROR_UNKNOWN_COMMAND = UNKNOWN_COMMAND
DHT.ERROR_BAD_COMMAND = BAD_COMMAND
DHT.ERROR_INVALID_TOKEN = INVALID_TOKEN
DHT.ERROR_BAD_COMMAND = BAD_COMMAND
module.exports = DHT

4
lib/errors.js

@ -1,6 +1,6 @@
exports.UNKNOWN_COMMAND = 1
exports.BAD_COMMAND = 2
exports.INVALID_TOKEN = 3
exports.INVALID_TOKEN = 2
exports.BAD_COMMAND = 3
exports.TIMEOUT = new Error('Request timed out')
exports.TIMEOUT.code = 'ETIMEDOUT'

Loading…
Cancel
Save