From Michael's comment
it looks like you can just catch the GuzzleHttp\Ring\Exception\ConnectException exception
like this:
use GuzzleHttp\Ring\Exception\ConnectException;
try {
// the code which throws the error
} catch( ConnectException $ex ) {
switch ( $ex->getMessage() ) {
case '7': // to be verified
// handle your exception in the way you want,
// maybe with a graceful fallback
break;
}
}
it appears guzzle's ConnectException extends some classes and ultimately extends php's Exception so you can safely use the getCode() method, allowing you to catch an identifier on which you can react accordingly to your needs.