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
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
Comment #2
xjmComment #3
xjmThis can happen in a minor release; changing specific exception handling is a disruptive, but minor-allowed change.
Comment #9
spokjeComment #10
smustgrave commentedSearched 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?Comment #11
alexpottCommitted 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.
Comment #13
quietone commentedThis needs a follow up per #11
Comment #15
spokjeFollow-up: #3418243: Use \Psr\Http\Client\ClientExceptionInterface instead of \GuzzleHttp\Exception\GuzzleException