Call to undefined method GuzzleHttp\Exception\ConnectException

Created on 30 November 2023, about 1 year ago
Updated 22 February 2024, 10 months ago

Error: Call to undefined method GuzzleHttp\Exception\ConnectException::getResponse() in Drupal\sidekick\SidekickService->checkKeyStatus() (line 137 of /app/web/modules/contrib/sidekick/src/SidekickService.php).

Error messege that we are getting when trying to connect site with Sidekick API key. Problem is in line 134 of SidekickService.php:
catch (ClientException|RequestException|TransferException|BadResponseException $exception) {
watchdog_exception('sidekick', $exception, null, [], 6);

return json_decode((string)$exception->getResponse()->getBody());
}

One more catch would be needed with ConnectException (keep in mind that it doesne have getResponse() method so smth other has to be done.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇦🇹Austria jovan1348

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024