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 to set 404 statusCode for current page? #2761
Comments
What date do you mean? Can you describe your issue more specifically? |
Here our app: https://icons8.com/icon/set/abcdefg/all |
I suggest you // pages/icon/set/_search/all.vue
async asyncData({ res}) {
const { data } = await axios.get('...')
if (!data) {
res.statusCode = 404
}
} |
This is exactly what I needed, thanks! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi guys!
If some data not found, I want to stay on the current page (layout) but with 404 statusCode, without redirection. Is it possible?
The text was updated successfully, but these errors were encountered: