N
Nuxt5mo ago
ALI

Nuxt 3 error handling

I have nuxt 3 app and I am using catch all route in my pages direcotry. Now, for testing purposes I just gave an incorrect baseURL and graphQL URL in my env file for server. I do get 500 status for the category page when I try to open it. but I expect to be redirected to an error page. First I made it the custom error page in the root directory but then for some reason i had to make it a separate component of my own inside components dir. Now, the problem is, my useError composable is undefined in composables/error.vue. so, can not display right message. I have even used error boundaries but still the same problem ~/error.vue and ~/composables/Error/index.vue are same.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server