When I enter a URL that does not exist, I sometimes get a custom error and most of the time a server error (image)
This is my error.vue
page:
{{ $t('notFound.error404') }}
{{ $t('notFound.error404Info') }}
{{ $t('notFound.error500') }}
{{ $t('notFound.error500') }}
{{ $t('notFound.home') }}
Note: 1- trrrrr
is just a random string I wrote in the URL to demonstrate a non-existent URL 2- In development mode, sometimes I get a custom 404 error, most of the time I get a Maximum call stack size returned
error (picture) p>
My PWA configuration:
pwa: { meta: { title: "example", author: "example", }, icon: { purpose: "any" }, manifest: { display: "standalone", name: "example", lang: "en", useWebmanifestExtension: true, theme_color: "#01bac6", }, },
My questions are: 1-Why does my custom error page always not work?
2- Why is the code error 500 when it should be 404 because I'm on a page that doesn't exist?
Finally I found the source of the problem, this is how I caught the error when the request was not fulfilled
How the problem occurs:
Change it to:
Source:https://github.com/nuxt/nuxt .js/issues/6294#issuecomment-526902792
I still don’t know why this problem occurs