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:
Vasco Santos
2019-02-26 14:15:30 +00:00
committed by Jacob Heun
parent f28ecb2483
commit de84ee473c
6 changed files with 138 additions and 19 deletions

11
src/errors.js Normal file
View 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'
}