{"version":"1.0","type":"rich","title":"Next.js Typescript error page","description":"This example shows a Next.js custom error page that displays either a server-side or client-side error message based on the HTTP status code. It uses Next.js’s `getInitialProps` lifecycle method to retrieve the status code from the `res` or `err` objects in the `NextPageContext`. The component conditionally renders text indicating whether the error occurred on the server or client, defaulting to a 404 status if no error is present. The code relies on React’s functional component pattern and Next.js’s built-in error handling.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-ee56b81e1d8e0a7e79b755b2d60b72fd?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}