Custom Error Page
Hey, I want to redirect the user to an error page if a server side API request fails. How can I do this?
I've looked at the createError method, but how can I make the error page custom? I tried adding
error.vue
to my root directory, pages and layouts folders, with no luck3 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Sorry was out of office.
I meant that even with the error.vue file I was still only seeing the default error page, not my custom one
Maybe you are doing something wrong, try it like in this example: https://nuxt.com/docs/examples/app/error-handling
Nuxt
Error Handling
This example shows how to handle errors in different contexts: pages, plugins, components and middleware.