Move AppstoreError to BoxError
This commit is contained in:
@@ -10,7 +10,6 @@ exports = module.exports = {
|
||||
};
|
||||
|
||||
var appstore = require('./appstore.js'),
|
||||
AppstoreError = require('./appstore.js').AppstoreError,
|
||||
assert = require('assert'),
|
||||
async = require('async'),
|
||||
backups = require('./backups.js'),
|
||||
@@ -67,7 +66,7 @@ function autoRegister(domain, callback) {
|
||||
debug('Auto-registering cloudron');
|
||||
|
||||
appstore.registerWithLicense(license.trim(), domain, function (error) {
|
||||
if (error && error.reason !== AppstoreError.ALREADY_REGISTERED) {
|
||||
if (error && error.reason !== BoxError.CONFLICT) { // not already registered
|
||||
debug('Failed to auto-register cloudron', error);
|
||||
return callback(new BoxError(BoxError.LICENSE_ERROR, 'Failed to auto-register Cloudron with license. Please contact support@cloudron.io'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user