Use 424 for access denied
This commit is contained in:
@@ -275,7 +275,7 @@ function setRegistryConfig(req, res, next) {
|
||||
if ('password' in req.body && typeof req.body.password !== 'string') return next(new HttpError(400, 'password is required'));
|
||||
|
||||
docker.setRegistryConfig(req.body, function (error) {
|
||||
if (error && error.reason === BoxError.ACCESS_DENIED) return next(new HttpError(400, error.message));
|
||||
if (error && error.reason === BoxError.ACCESS_DENIED) return next(new HttpError(424, error.message));
|
||||
if (error) return next(new HttpError(500, error));
|
||||
|
||||
next(new HttpSuccess(200));
|
||||
|
||||
Reference in New Issue
Block a user