diff --git a/src/apps.js b/src/apps.js index 3eb444b63..1d4e25d0b 100644 --- a/src/apps.js +++ b/src/apps.js @@ -152,7 +152,6 @@ AppsError.ALREADY_EXISTS = 'Already Exists'; AppsError.NOT_FOUND = 'Not Found'; AppsError.BAD_FIELD = 'Bad Field'; AppsError.BAD_STATE = 'Bad State'; -AppsError.PORT_RESERVED = 'Port Reserved'; AppsError.PORT_CONFLICT = 'Port Conflict'; AppsError.LOCATION_CONFLICT = 'Location Conflict'; AppsError.PLAN_LIMIT = 'Plan Limit'; @@ -201,7 +200,7 @@ function validatePortBindings(portBindings, manifest) { const hostPort = portBindings[portName]; if (!Number.isInteger(hostPort)) return new AppsError(AppsError.BAD_FIELD, `${hostPort} is not an integer`); - if (RESERVED_PORTS.indexOf(hostPort) !== -1) return new AppsError(AppsError.PORT_RESERVED, `Port ${hostPort} is reserved.`); + if (RESERVED_PORTS.indexOf(hostPort) !== -1) return new AppsError(AppsError.PORT_CONFLICT, `Port ${hostPort} is reserved.`); if (hostPort <= 1023 || hostPort > 65535) return new AppsError(AppsError.BAD_FIELD, `${hostPort} is not in permitted range`); } diff --git a/src/routes/apps.js b/src/routes/apps.js index fba45486d..561b90403 100644 --- a/src/routes/apps.js +++ b/src/routes/apps.js @@ -41,8 +41,8 @@ function toHttpError(appError) { case AppsError.NOT_FOUND: return new HttpError(404, appError); case AppsError.ALREADY_EXISTS: - case AppsError.PORT_RESERVED: case AppsError.PORT_CONFLICT: + case AppsError.LOCATION_CONFLICT: case AppsError.BAD_STATE: return new HttpError(409, appError); case AppsError.BAD_FIELD: