reword error message, all apps using a domain have to be deleted

This commit is contained in:
Johannes Zellner
2018-03-07 10:45:03 +01:00
parent d69c8f49e5
commit 9d4eee0dfe

View File

@@ -87,7 +87,7 @@ function del(req, res, next) {
domains.del(req.params.domain, function (error) { domains.del(req.params.domain, function (error) {
if (error && error.reason === DomainError.NOT_FOUND) return next(new HttpError(404, error.message)); if (error && error.reason === DomainError.NOT_FOUND) return next(new HttpError(404, error.message));
if (error && error.reason === DomainError.IN_USE) return next(new HttpError(409, 'Domain is still in use. Remove any apps using this domain')); if (error && error.reason === DomainError.IN_USE) return next(new HttpError(409, 'Domain is still in use. Remove all apps using this domain'));
if (error) return next(new HttpError(500, error)); if (error) return next(new HttpError(500, error));
next(new HttpSuccess(204)); next(new HttpSuccess(204));