N
Nuxt2y ago
Flinty

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 luck
3 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Flinty
FlintyOP2y ago
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
conner
conner2y ago
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.
Want results from more Discord servers?
Add your server