Problem/Motivation

When offline, the OEmbed provider throws an exception, which is not passed to the user.

The website encountered an unexpected error. Please try again later.

Drupal\media\OEmbed\ProviderException: Could not retrieve the oEmbed provider database from https://oembed.com/providers.json in Drupal\media\OEmbed\ProviderRepository->getAll() (line 85 of core/modules/media/src/OEmbed/ProviderRepository.php).

Steps to reproduce

Have a media type remote video enabled and try to quick-edit a remote video on the overview page,
or add a new media in the field widget.

Proposed resolution

Catch the exception and pass it to the user, so that the AJAX call does not return HTTP 500.

Comments

ytsurk created an issue. See original summary.

ytsurk’s picture

Priority: Normal » Minor
Status: Active » Needs work
ytsurk’s picture

Status: Needs work » Needs review
StatusFileSize
new1.11 KB

Catching and passing the error on.

  • ytsurk committed 123d0d5 on 2.x
    Issue #3165119 by ytsurk: Broken functionality if working offline
    
ytsurk’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.