when saving a node that has a tweet that does not exist

Sorry, that page doesn’t exist!

than the node is not saved and WSOD appears

on the database log this message appears

GuzzleHttp\Exception\ClientException: Client error: `GET https://twitter.com/USERNAME/status/XXXXXXXXXXXXXXXXXXXXX` resulted in a `404 Not Found` response: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Conte (truncated...) in GuzzleHttp\Exception\RequestException::create() (line 113 from /var/www/vhosts/domain.com/httpdocs/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php).

I think its a bug because what a user would expect is some warning that the tweet does not exist and go back to the edit form

EDIT: some parts of the error code were translated directly from greek

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GiorgosK created an issue. See original summary.

GiorgosK’s picture

Issue summary: View changes
GiorgosK’s picture

Issue summary: View changes
chr.fritsch’s picture

Project: Thunder » Media entity Twitter
Version: 8.x-2.9 » 8.x-1.x-dev

Let's move this issue to media_entity_twitter

maosmurf’s picture

Same here. We solved this by try/catching

$this->httpClient->get
maosmurf’s picture

As a result, the constraint message is displayed

chr.fritsch’s picture

Status: Active » Needs work

Patch does not apply anymore

chr.fritsch’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev

Lets move to 2.x

chr.fritsch’s picture

Status: Needs work » Needs review
FileSize
1.84 KB

Here is a new patch. I don't think we have to put that message in the watchdog.

Status: Needs review » Needs work

The last submitted patch, 9: 2923073-9.patch, failed testing. View results

chr.fritsch’s picture

Status: Needs work » Needs review
FileSize
3.09 KB

Fix tests. Tweet didn't exist anymore.

volkerk’s picture

Status: Needs review » Reviewed & tested by the community

WSOD is not reproducible with 2.x, anyway validation error is now triggered when using a private twitter url.

LGTM

  • chr.fritsch committed 6cb1e21 on 8.x-2.x
    Issue #2923073 by chr.fritsch, maosmurf, volkerk: non existent tweet...
chr.fritsch’s picture

Status: Reviewed & tested by the community » Fixed

Done

Status: Fixed » Closed (fixed)

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