Custom fetch server 404 responses are discarded
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript, vite
Research direction
Start with the custom server entry point shown in the StackBlitz reproduction, server/server.ts, and compare its fetch handling with the Vite and Nitro configuration. Reproduce the request that returns a 404 Response; done means that response is preserved instead of being discarded and handled by the frontend.
Written by the indexing model from the issue text.
Description
Environment
- nitro@3.0.1-alpha.1
- vite@7.3.0
// vite.config.ts
import { nitro } from 'nitro/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [nitro()],
});
// nitro.config.ts
export default defineNitroConfig({
serverDir: 'server',
});
Reproduction
Describe the bug
When using Vite and a custom server.ts with fetch, if the fetch returns a 404 Response, it is discarded and the request is handled by the frontend
- Dominant language
- TypeScript
- Stars
- 11.2k
- Forks
- 899
- Avg merge
- 2d 24m
- Merged PRs (30d)
- 40
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nitrojs/nitro
-
pending triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
v2 v3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
v3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
fix(task): add per-request timeout to `devFetch` http.request() call to prevent indefinite hang Openv3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
comp/dashboard P3 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NousResearch/hermes-agent#117722 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·