Skip to content

Facebook Embed Block preview error doesn't differentiate from a oEmbed API error #8361

@7studio

Description

@7studio

Describe the bug
When I try to use the Embed Blocks, the preview of a valid embeddable content and the error message for an invalid URL have the same render.

To Reproduce
Steps to reproduce the behaviour:

  1. Create a new content.
  2. Add a Facebook Embed Block.
  3. Paste a valid content URL. E.g.: https://www.facebook.com/oohmyworld/videos/2324195200940031/
  4. See the error message "Previews for this are unavailable in the editor, sorry!".
  5. Add a Facebook Embed Block.
  6. Paste an invalid content URL. E.g.: https://www.facebook.com/oohmyworld/vides/2324195200940031/
  7. See the error message "Previews for this are unavailable in the editor, sorry!".

Expected behaviour
Gutenberg should display different error messages for failed previews and failed oEmbed API requests.
E.g.:

  • Failed preview: "Previews for this are unavailable in the editor, sorry!"
  • oEmbed API error: "This content URL is invalid, sorry!"

Screenshots

Edition:

Previews for Embeddable Facebook Content
Previews for Embeddable Facebook Content

Website:

Previews for Embeddable Facebook Content
Previews for Embeddable Facebook Content

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Copy ReviewNeeds review of user-facing copy (language, phrasing)[Block] EmbedAffects the Embed Block[Feature] BlocksOverall functionality of blocks[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions