We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1df2a39 commit 0d7ffccCopy full SHA for 0d7ffcc
shared/utils/npm.ts
@@ -57,7 +57,8 @@ export function assertValidPackageName(name: string): void {
57
export function assertValidUsername(username: string): void {
58
if (!username || username.length > NPM_USERNAME_MAX_LENGTH || !NPM_USERNAME_RE.test(username)) {
59
throw createError({
60
- statusCode: 400,
+ // TODO: throwing 404 rather than 400 as it's cacheable
61
+ statusCode: 404,
62
message: `Invalid username: ${username}`,
63
})
64
}
0 commit comments