Problem/Motivation

Once we support only Guzzle 7 in Drupal 10 we can catch \Psr\Http\Client\ClientExceptionInterface errors instead of \GuzzleHttp\Exception\TransferException and take a small step towards making the client used by Drupal swappable.

Follow-up from #3188920: Make Guzzle exception handling forward-compatible with Guzzle 7

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3189301

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alexpott created an issue. See original summary.

xjm’s picture

Version: 10.0.x-dev » 10.1.x-dev

This can happen in a minor release; changing specific exception handling is a disruptive, but minor-allowed change.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Spokje made their first commit to this issue’s fork.

Spokje changed the visibility of the branch 3189301-use-psrhttpclientclientexceptioninterface-instead to hidden.

Spokje changed the visibility of the branch 3189301-use-psrhttpclientclientexceptioninterface-instead to active.

spokje’s picture

Status: Active » Needs review
Issue tags: -Drupal 11
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Searched repo for GuzzleHttp\Exception\TransferException; and found 13 instances, which were replaced in the MR. Tests are green so replacement seems good. Wonder if there is any check we could add though or if it's used so little not worth it?

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 8c89656bdd and pushed to 11.x. Thanks!

We should also file an issue to deal with \GuzzleHttp\Exception\GuzzleException - there's a few usages in core.

  • alexpott committed 8c89656b on 11.x
    Issue #3189301 by Spokje, xjm, smustgrave: Use \Psr\Http\Client\...
quietone’s picture

Issue tags: +Needs followup

This needs a follow up per #11

Status: Fixed » Closed (fixed)

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