rsnext/errors/invalid-getserversideprops-value.mdx
Delba de Oliveira 44d1a1cb15
docs: Migrate error messages to MDX and App Router. (#52038)
This PR is part of a larger effort to migrate error messages to MDX and
use App Router: https://github.com/vercel/front/pull/23459
2023-07-05 06:11:16 -07:00

23 lines
533 B
Text

---
title: 'Invalid `getServerSideProps` Return Value'
---
## Why This Error Occurred
In one of the page's `getServerSideProps` the return value had the incorrect shape.
## Possible Ways to Fix It
Make sure to return the following shape from `getServerSideProps`:
```ts filename="pages/example.js"
export async function getServerSideProps(ctx: GetServerSidePropsContext) {
return {
props: { [key: string]: any }
}
}
```
## Useful Links
- [getServerSideProps](/docs/pages/api-reference/functions/get-server-side-props)