Skip to content

Commit 1df2a39

Browse files
committed
fix: remove incorrect statusCode
1 parent 584b7a7 commit 1df2a39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

shared/utils/npm.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ export function assertValidPackageName(name: string): void {
4242
if (!result.validForNewPackages && !result.validForOldPackages) {
4343
const errors = [...(result.errors ?? []), ...(result.warnings ?? [])]
4444
throw createError({
45-
statusCode: 400,
45+
// TODO: throwing 404 rather than 400 as it's cacheable
46+
statusCode: 404,
4647
message: `Invalid package name: ${errors[0] ?? 'unknown error'}`,
4748
})
4849
}

0 commit comments

Comments
 (0)