Is a 500 staus code page out of the box in optimizely, or is it possible to implement a page in case of a 500 error? We have already implemented a 404 page, maybe we can reuse something?
I don't think there is a built in page. also it does not "handle" 500 redirect, that's ASP.NET Core job. You probably can use UseStatusCodePagesWithRedirects and then reuse your 404 page to display 500 error if that happens?
I would recommend using UseStatusCodePagesWithReExecute instead of UseStatusCodePagesWithRedirects, then the error code and URL is kept. As of EPiServer.CMS.UI 12.20.0 we do provide error pages for 403, 404 and 500 when not in development mode/environment. So if you set environment name to production, you can actually test this.