Skip to content

Incorrect error message when navigating to a non-existent route and rendering the static fallback error page #10898

@teemingc

Description

@teemingc

From #10565 (comment)

When navigating to a non-existent route, sveltekit tries to render the default error page. However, if an error occurs during rendering (e.g., referencing an undefined property in the root +layout.svelte file), sveltekit returns the static fallback error page instead.

static fallback error page with a "not found" error message instead of "internal server error"

I think in this case, it's working correctly. Since the error occurred while rendering the default error page, we get the static fallback error page. However, the error message is incorrect. It should be "Internal Error" although the route we are navigating to doesn't exist.

message: event.route.id != null ? 'Internal Error' : 'Not Found'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions