Skip to content

Visiting a non-existing package page returns a 200 OK response with JSON error envelope #3204

Open

Description

@lirantal

Describe the bug

See screenshot straight from the browser, demonstrating the format of the request package name (that is likely non-existent on the npm registry) and the JSON response data returned in an HTTP 200 OK:

Image

Additional context

Expected outcome would be that the npmx.dev return a 404 page

Logs

Activity

  1. added theissue type on Aug 25, 2026
  2. coder-tejas commented on Aug 25, 2026

    @coder-tejas
    Contributor

    Hey, I'd like to take a look at this. From digging into the code, it looks like it might be caused by how the /package/** route's ISR caching (in nuxt.config.ts) interacts with Vercel's error-status handling ,the 404 gets set correctly during render but might not survive the ISR cache write. Before I dive in: is this expected to be fixable purely in this repo (e.g. a config tweak or dependency bump), or does it depend on an upstream fix in Nitro/Vercel's preset? Want to make sure I'm not chasing something outside our control.

  3. gameroman commented on Aug 26, 2026

    @gameroman
    Member

    Just saw this happen to me too

    Image

    though in this case package does exist, just old cache for a new version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending triageNew issue waiting for initial maintainer triagestaleThis has become stale and may be closed soon

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions