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(tutorials/jokes): use enabled future flags #6050

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

MichaelDeBoey
Copy link
Member

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Apr 12, 2023

⚠️ No Changeset found

Latest commit: 55ad7d8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ryanflorence ryanflorence merged commit 83834c3 into remix-run:main Apr 12, 2023
@MichaelDeBoey MichaelDeBoey deleted the update-jokes-tutorial branch April 12, 2023 18:44
@@ -4113,68 +4141,66 @@ Sometimes users do things we can anticipate. I'm not talking about validation ne

It might help to think of the unexpected errors as 500-level errors ([server errors][server-errors]) and the expected errors as 400-level errors ([client errors][client-errors]).

For client error responses, Remix offers something similar to Error Boundaries. It's called [`Catch Boundaries`][catch-boundaries] and it works almost exactly the same. In this case, when your server code detects a problem, it'll throw a [`Response`][response] object. Remix then catches that thrown response and renders your `CatchBoundary`. Just like the `useLoaderData` hook to get data from the `loader` and the `useActionData` hook to get data from the `action`, the `CatchBoundary` gets its data from the `useCatch` hook. This will return the `Response` that was thrown.
To check for client error responses, Remix offers the [`isRouteErrorResponse`][is-route-error-response] helper function. In the case that your server code detects a problem, it'll throw a [`Response`][response] object. Remix then catches that thrown `Response` and renders your `ErrorBoundary`. Since you can throw whatever you want, the `isRouteErrorResponse` helper function is a way to check if the thrown instance is a `Response` object.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link for is-route-error-response seems to point in the wrong path? 😅

https://remix.run/docs/en/main/utils/is-route-error-response

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once #6064 is merged, this will be fixed.

Thanks for noticing us! 🙏

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants