diff --git a/docs/basic-features/data-fetching/get-server-side-props.md b/docs/basic-features/data-fetching/get-server-side-props.md index 377a775aa5a2..da0463f1fecd 100644 --- a/docs/basic-features/data-fetching/get-server-side-props.md +++ b/docs/basic-features/data-fetching/get-server-side-props.md @@ -47,8 +47,8 @@ Take the following example. An API route is used to fetch some data from a CMS. If your page contains frequently updating data, and you don’t need to pre-render the data, you can fetch the data on the [client side](/docs/basic-features/data-fetching/client-side.md). An example of this is user-specific data: -- First, immediately show the page without data. Parts of the page can be pre-rendered using Static Generation. You can show loading states for missing data. -- Then, fetch the data on the client side and display it when ready. +- First, immediately show the page without data. Parts of the page can be pre-rendered using Static Generation. You can show loading states for missing data +- Then, fetch the data on the client side and display it when ready This approach works well for user dashboard pages, for example. Because a dashboard is a private, user-specific page, SEO is not relevant and the page doesn’t need to be pre-rendered. The data is frequently updated, which requires request-time data fetching. @@ -74,6 +74,10 @@ export async function getServerSideProps() { export default Page ``` +## Does getServerSideProps render an error page + +If an error is thrown inside `getServerSideProps`, it will show the `pages/500.js` file. Check out the documentation for [500 page](/docs/advanced-features/custom-error-page#500-page) to learn more on how to create it. During development this file will not be used and the dev overlay will be shown instead. + ## Related For more information on what to do next, we recommend the following sections: