mirror of
https://github.com/caprover/caprover
synced 2026-09-24 07:35:36 +00:00
Throw proper error to be shown if app name is not found
This commit is contained in:
@@ -16,7 +16,8 @@ router.post('/:appName/', function (req, res, next) {
|
||||
dataStore.getAppDefinitions()
|
||||
.then(function (apps) {
|
||||
if (!apps[appName]) {
|
||||
throw new Error('App not found!');
|
||||
throw ApiStatusCodes.createError(ApiStatusCodes.STATUS_ERROR_GENERIC,
|
||||
"App not found: " + appName + "! Make sure your app is created before deploy!");
|
||||
}
|
||||
next();
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user