Skip to content

Custom fetch server 404 responses are discardedΒ #3900

@nemvince

Description

@nemvince

Environment

// 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

StackBlitz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions