diff --git a/lib/domains.js b/lib/domains.js index a6da806..5e89295 100644 --- a/lib/domains.js +++ b/lib/domains.js @@ -8,6 +8,7 @@ const chalk = require('chalk') const Now = require('../lib') const isZeitWorld = require('./is-zeit-world') const { DNS_VERIFICATION_ERROR } = require('./errors') +const cmd = require('./utils/output/param') const domainRegex = /^((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}$/ @@ -156,7 +157,11 @@ module.exports = class Domains extends Now { if ([400, 403, 500, 503].includes(res.status)) { const e = new Error() e.code = json.error.code - e.message = json.error.message + if (json.error.code === 'source_not_found') { + e.message = `No credit cards found – please run ${cmd('now cc add')}` + } else { + e.message = json.error.message + } return bail(e) }