Skip to content

404 and layout load fetch to prerendered endpoint returns internal server error #10556

@teemingc

Description

@teemingc

Describe the bug

Both kit.svelte.dev and svelte.dev are not showing the 404 page correctly.
e.g., https://kit.svelte.dev/abc CC: PuruVJ

EDIT: See #10556 (comment)

Reproduction

https://github.com/gtm-nayan/kit-sandbox/tree/prerendered-endpoint-repro

  1. Build the site.
  2. Run pnpm preview
  3. Navigate to a missing route e.g., /abc.

Expected: The +error.svelte page is rendered with a 404 status.

Actual: The fallback error.html page is used and the status is 500.

Logs

No response

System Info

n/a

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions