- Issue created by @enchufe
- Merge request !8Issue #3463968: Catch \GuzzleHttp\Exception\GuzzleException exceptions → (Open) created by enchufe
- Status changed to Needs review
9 months ago 9:17am 26 July 2024
When importing an image from a server without an SSL security certificate or with errors in the certificate, an error occurs that stops the migration.
In CurlFactory.php line 211:
cURL error 60: SSL: no alternative certificate subject name matches target host name 'myhost.com' (see https://curl.haxx.se/libcur
l/c/libcurl-errors.html) for https://myhost.com/route/to/file.jpeg
I know this is a rather unusual use case and reproducing the error is tricky, in my case the error is occurring because the website from which the files are being imported is a Drupal 7 raised with DDEV, which caul adds an extra layer of complication.
The error occurs because \Drupal\migrate_file\Plugin\migrate\process\FileImport::sourceExists
is not able to handle this exception. As a solution, a generic Guzzle
catch
can be added to the try
of the method.
Needs review
2.1
Code