Next.js crashes on invalid URL

1.3k Views Asked by At

Next.js server crashes (ERR_INVALID_URL) on requests with invalid url, like *. Is there a way to prevent this? For instance, intercepting the error and wrapping it into the try block. Solutions like the custom error page (pages/_error.ts) seems to not work.

0

There are 0 best solutions below