Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: Check if the GET comments response was ok, otherwise throw #62041

Conversation

icyJoseph
Copy link
Contributor

Fixes #61941 example blog-with-comment.

The root issue is that the SWR fetcher does not check the ok status of the response, and that way we end up putting the error message object into the SWR data. And then .map is invoked in the object.

Since this is a learning kind of example, I think perhaps the presented change is just about enough to understand what's going on. Whether or not the people using the example want to gain access to the message from the server is up to them.

@icyJoseph icyJoseph requested review from a team as code owners February 14, 2024 08:30
@icyJoseph icyJoseph requested review from timeyoutakeit and StephDietz and removed request for a team February 14, 2024 08:30
@ijjk ijjk added the examples Issue/PR related to examples label Feb 14, 2024
@ijjk
Copy link
Member

ijjk commented Feb 14, 2024

Allow CI Workflow Run

  • approve CI run for commit: 35d3af1

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

@styfle styfle added the CI approved Approve running CI for fork label Feb 14, 2024
@styfle styfle enabled auto-merge (squash) February 14, 2024 15:02
@styfle styfle merged commit 6fb3993 into vercel:canary Feb 14, 2024
32 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI approved Approve running CI for fork examples Issue/PR related to examples locked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

blog-with-comment issue mapping comments if undefined
3 participants