Home

Issue: 895

Programmatically render error pages

[issue link]

Hi there. I’m currently working on a project that uses Nuxt programmatically. On the server, I’ve created a custom (Express) route that handles user authentication. In this route I throw an exception when something goes wrong. At the moment it’s simply returning JSON, but I want to return a Nuxt error page instead.

How can I accomplish this? Is there like a function I can call or can I set a statusCode/ message on the response object?

Thanks in advance.

This question is available on Nuxt.js community (#c766)