Preview problem - Internal Server Error 500

Hey, so I am facing a similar issue. I use next.js on my application and I am receiving 500 Internal Server Errors on my unpublished documents. It works fine for all other documents.

I saw that Troubleshooting: Previews provides help here, but adding the toolbar js on my 404 page did not help unfortunately. The rest is pretty much set up as it is recommended here Previews with Next.js - Prismic

Is there a proper way to preview unpublished docs?

Thanks!