I'd do a check with `has('Config')` prior to this, and return false if that service is not available:

```php
if (!$serviceLocator->has('Config')) {
    return false;
}
$config = $serviceLocator->get('Config');
```

That way no exception is thrown if the config service is unavailable, but the method will still correctly report it cannot create the service.