improve config loading; remove debug

This commit is contained in:
Josh Harvey 2017-04-25 02:25:32 +03:00
parent 5f0b70ca42
commit 614c64646a
15 changed files with 198 additions and 193 deletions

View file

@ -17,11 +17,9 @@ function sendMessage (account, rec) {
from: account.fromNumber
}
console.log('DEBUG111: %j', opts)
return client.sendMessage(opts)
.catch(err => {
console.log('DEBUG113: %s', err)
if (_.includes(err.code, BAD_NUMBER_CODES)) {
const badNumberError = new Error(err.message)
badNumberError.name = 'BadNumberError'
@ -30,7 +28,6 @@ function sendMessage (account, rec) {
throw new Error(err.message)
})
.then(_.tap(() => console.log('DEBUG112')))
}
module.exports = {