Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I set status code 404 #278

Open
jacquesmatthieu opened this issue Mar 26, 2020 · 2 comments
Open

How can I set status code 404 #278

jacquesmatthieu opened this issue Mar 26, 2020 · 2 comments

Comments

@jacquesmatthieu
Copy link

jacquesmatthieu commented Mar 26, 2020

Hi,
How can I set status code to 404 when I display notFound page ?

My page is 200 but I want 404 status code

Thanks for all

Capture du 2020-03-26 18-48-43

 renderer.renderToString(context, (err, html) => {
        if (err) {
            if (err.message === 404) {
                res.status(404).end('Page not found');
            } else {
                // eslint-disable-next-line no-console
                console.log(err);
                res.status(500).end('Internal Server Error');
            }
        }
        res.end(html);
    });

@ikonduktor
Copy link

same issue here

@jacquesmatthieu
Copy link
Author

me issue here

where ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants