Skip to content

engine: return HTTP 404 when Page404 component is rendered #697

@algomaster99

Description

@algomaster99

Extracted from #690 (comment)

Example: the engine renders a huge number "404", however it already responded with HTTP 200:

image

URL: https://dvc.org/doc/command-reference/bad

It would be ideal if the engine could check for the URL path validity first before responding by rendering the general layout (navigation, etc) with HTTP 200, and render it instead with HTTP 404 (and Page404 ).

This can aid in checking links by running script in #690. Once 404 is returned, we will be able to distinguish between existing pages and Not found ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-nice-to-haveLess of a priority at the moment. We don't usually deal with this immediately.type: enhancementSomething is not clear, small updates, improvement suggestionswebsite: eng-docDEPRECATED JS engine for /doc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions