rsnext/errors/gssp-mixed-not-found-redirect.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

18 lines
687 B
Text

---
title: 'Mixed `notFound` and `redirect`'
---
## Why This Error Occurred
In one of your page's `getStaticProps` or `getServerSideProps` `notFound` and `redirect` values were both returned.
These values can not both be returned at the same time and one or the other needs to be returned at a time.
## Possible Ways to Fix It
Make sure only `notFound` **or** `redirect` is being returned on your page's `getStaticProps` or `getServerSideProps`
## Useful Links
- [`getStaticProps` Documentation](/docs/pages/building-your-application/data-fetching/get-static-props)
- [`getServerSideProps` Documentation](/docs/pages/building-your-application/data-fetching/get-server-side-props)