mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-21 04:51:33 +00:00
chore: add error codes to dht and pubsub errors (#328)
* chore: add error codes to dht and pubsub errors * fix: code review
This commit is contained in:
11
src/errors.js
Normal file
11
src/errors.js
Normal file
@ -0,0 +1,11 @@
|
||||
'use strict'
|
||||
|
||||
exports.messages = {
|
||||
NOT_STARTED_YET: 'The libp2p node is not started yet',
|
||||
DHT_DISABLED: 'DHT is not available'
|
||||
}
|
||||
|
||||
exports.codes = {
|
||||
DHT_DISABLED: 'ERR_DHT_DISABLED',
|
||||
PUBSUB_NOT_STARTED: 'ERR_PUBSUB_NOT_STARTED'
|
||||
}
|
Reference in New Issue
Block a user