Skip to content

Code browser never loads UI for large files, swallows errors #2732

@mootari

Description

@mootari

Describe the bug

When trying to serve a large file the /api/registry/file endpoint returns a 413 response (PAYLOAD_TOO_LARGE, see #2332). Due to a lack of explicit error handling the UI remains in a perpetual loading state and fails to render remaining elements like the "Open raw file" button.

Steps:

  1. Go to https://npmx.dev/package-code/@types/vscode/v/1.118.0/package.json
  2. From the file list select index.d.ts (~720KB)
  3. Observe that no error is displayed in the UI and that the "Open raw file" button is never rendered

Additional context

While #2332 is related it is arguably more focused on the backend side. I've filed this issue separately to track the error handling in the UI.

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontFrontend, Design

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions