Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

docs: Add example code block to error handling docs #67515

Merged
merged 3 commits into from
Jul 7, 2024

Conversation

mert-duzgun
Copy link
Contributor

@mert-duzgun mert-duzgun commented Jul 6, 2024

I added an example code block to support the following description;

"When fetching data inside of a Server Component, you can use the response to conditionally render an error message or redirect."

If docs are mentioning something, it should contain examples for it. Otherwise it might lead to confusions.

Changing description to something like this would also work;

"When fetching data inside of a Server Component, you can use the response to conditionally render an error message."

But I think first option is better because it offers more options.

cc @leerob

@ijjk ijjk added the Documentation Related to Next.js' official documentation. label Jul 6, 2024
@ijjk
Copy link
Member

ijjk commented Jul 6, 2024

Allow CI Workflow Run

  • approve CI run for commit: 4e3c168

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@leerob
Copy link
Member

leerob commented Jul 6, 2024

I would instead suggest that we link redirect to go to those docs, versus the inline code snippet.

@mert-duzgun
Copy link
Contributor Author

makes sense. updated!

@leerob leerob merged commit 1ccc9e8 into vercel:canary Jul 7, 2024
33 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 22, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Documentation Related to Next.js' official documentation. locked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants