From 6168ea3335fa92278b799b8089c11dcb32af12ac Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 21 Oct 2023 15:25:28 +0200 Subject: [PATCH] do not catch error during pullcontainer so that it throws and logs if it cannot get the image Signed-off-by: Simon L --- php/src/Docker/DockerActionManager.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index d9942fbe..9a5ddf33 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -577,14 +577,8 @@ class DockerActionManager public function PullContainer(Container $container) : void { $url = $this->BuildApiUrl(sprintf('images/create?fromImage=%s', urlencode($this->BuildImageName($container)))); - try { - $this->guzzleClient->post($url); - } catch (RequestException $e) { - error_log('Could not get image ' . $this->BuildImageName($container) . ' from docker hub. Probably due to rate limits. ' . $e->getMessage()); - // Don't exit here because it is possible that the image is already present - // and we ran into docker hub limits. - // We will exit later if not image should be available. - } + // do not catch any exception so that it always throws and logs the error + $this->guzzleClient->post($url); } private function isContainerUpdateAvailable(string $id) : string