You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
536 B
25 lines
536 B
const error = require('../output/error');
|
|
|
|
module.exports = function (err) {
|
|
switch (err.code) {
|
|
case 'invalid_domain': {
|
|
error('Invalid domain')
|
|
break
|
|
}
|
|
case 'not_available': {
|
|
error('Domain can\'t be purchased at this time')
|
|
break
|
|
}
|
|
case 'service_unavailabe': {
|
|
error('Purchase failed – Service unavailable')
|
|
break
|
|
}
|
|
case 'unexpected_error': {
|
|
error('Purchase failed – Unexpected error')
|
|
break
|
|
}
|
|
default: {
|
|
error(err.message)
|
|
}
|
|
}
|
|
}
|
|
|