If you're considering PuppeteerSharp for PDF generation, here's the version of the story that doesn't show up in the "getting started" docs.
Source code: Global exception handling in ASP.NET Core (.NET 10) using IExceptionHandler + RFC 7807 Problem Details. Maps custom exceptions to structured 404/400/403/500 responses. - codingdroplets ...