Skip to content

Commit

Permalink
HPC-9989: Gracefully handle missing images in CM environments
Browse files Browse the repository at this point in the history
  • Loading branch information
berliner committed Dec 23, 2024
1 parent cd157a1 commit ed56f50
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,14 @@ public function getFileContent($uri) {
$basic_auth['pass'],
];
}
$response = $this->httpClient->get($uri, $options);
return $response->getBody();
try {
$response = $this->httpClient->get($uri, $options);
return $response->getBody();
}
catch (ClientException $e) {
// The image wasn't found or something similar.
return NULL;
}
}

/**
Expand Down

0 comments on commit ed56f50

Please sign in to comment.