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:
- Go to https://npmx.dev/package-code/@types/vscode/v/1.118.0/package.json
- From the file list select
index.d.ts (~720KB)
- 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
Describe the bug
When trying to serve a large file the
/api/registry/fileendpoint 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:
index.d.ts(~720KB)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