Use 424 for access denied

This commit is contained in:
Girish Ramakrishnan
2019-09-23 12:33:17 -07:00
parent 9f792fc04b
commit 93344a5a4a

View File

@@ -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));