Skip to content

Commit f7736b4

Browse files
committed
chore: fix wrong error
1 parent 8407cda commit f7736b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gitlab.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default class VerdaccioGitLab implements VerdaccioGitLabPlugin {
103103
GitlabAPI.Users.current()
104104
.then(response => {
105105
if (user !== response.username) {
106-
return cb(getForbidden('wrong gitlab username'));
106+
return cb(getUnauthorized('wrong gitlab username'));
107107
}
108108

109109
const publishLevelId = ACCESS_LEVEL_MAPPING[this.publishLevel];
@@ -177,7 +177,7 @@ export default class VerdaccioGitLab implements VerdaccioGitLabPlugin {
177177
return cb(null, true);
178178
} else {
179179
this.logger.debug(`[gitlab] deny access to package: ${_package.name}`);
180-
return cb(getForbidden('access denied, user not authenticated and anonymous access disabled'));
180+
return cb(getUnauthorized('access denied, user not authenticated and anonymous access disabled'));
181181
}
182182
}
183183
}

0 commit comments

Comments
 (0)