I have a Next.js v12 application written in TypeScript.
I have a _error.tsx page providing custom UI experience for various errors, including 410, 404 and other ones. The issue is, whatever API error triggers the appearance of this page on the server-side, the client browser GETs this page from server with the HTTP status code of 500.
How could I customize that status code, so that for example the page for 410 actually has the HTTP status code of 410?