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(iframe-block): handle errors from server-side fetch #1162

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

miguelpeixe
Copy link
Member

@miguelpeixe miguelpeixe commented Jun 8, 2022

All Submissions:

Changes proposed in this Pull Request:

Handle errors from server-side fetch of iframe URL for the iframe block:

image

Closes #1160

How to test the changes in this Pull Request:

  1. On the master branch, create a draft post and paste a random non-existent URL to an iframe block
  2. Observe the error as described in Iframe block errored URLs are not handled #1160
  3. Check out this branch, paste the URL again and confirm you see the error message returned from wp_safe_remote_head(), as shown above

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@miguelpeixe miguelpeixe requested a review from a team as a code owner June 8, 2022 15:10
@miguelpeixe miguelpeixe self-assigned this Jun 8, 2022
Copy link
Contributor

@dkoo dkoo left a comment

Choose a reason for hiding this comment

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

💯

@miguelpeixe miguelpeixe merged commit 8378b41 into master Jun 10, 2022
@miguelpeixe miguelpeixe deleted the fix/iframe-block-error-handling branch June 10, 2022 19:40
matticbot pushed a commit that referenced this pull request Jun 16, 2022
# [1.53.0-alpha.1](v1.52.0...v1.53.0-alpha.1) (2022-06-16)

### Bug Fixes

* **donate:** amount formatting ([c766ce3](c766ce3))
* **homepage posts block:** align items when an odd number of items is inserted ([#1173](#1173)) ([7139567](7139567))
* **iframe-block:** handle errors from server-side fetch ([#1162](#1162)) ([8378b41](8378b41))
* make sure block exists before unregistering ([#1169](#1169)) ([6d3deed](6d3deed))

### Features

* unregister the Jetpack Donation block ([#1163](#1163)) ([6acbcac](6acbcac))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.53.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Jun 27, 2022
# [1.53.0](v1.52.0...v1.53.0) (2022-06-27)

### Bug Fixes

* **donate:** amount formatting ([c766ce3](c766ce3))
* **homepage posts block:** align items when an odd number of items is inserted ([#1173](#1173)) ([7139567](7139567))
* **iframe-block:** handle errors from server-side fetch ([#1162](#1162)) ([8378b41](8378b41))
* make sure block exists before unregistering ([#1169](#1169)) ([6d3deed](6d3deed))

### Features

* unregister the Jetpack Donation block ([#1163](#1163)) ([6acbcac](6acbcac))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.53.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Iframe block errored URLs are not handled
3 participants