Getting MIDDLEWARE_INVOCATION_FAILED error in astro website

I have a static website built with Astro that works fine in my local enviroment and Netlify. After deploying it to Vercel, I am getting the following error for routes containing unicode characters:

500: INTERNAL_SERVER_ERROR 
Code: MIDDLEWARE_INVOCATION_FAILED

I tried to troubleshoot by following existing guide but was not able to enable runtime logs in Vercel.

Please let me know if you have any ideas regarding this issue or need any further details.

Configuration Details:

  1. Framework: Astro 5.7.12
  2. Using decodeURI for unicode conversion in routes

Hi @das10lm, welcome to the Vercel Community!

Sorry that you’re running into this issue. Can you please share your public repo or a minimal reproducible example. That will let us all work together from the same code to figure out what’s going wrong.