可以通过在withFilter方法中使用try-catch块捕获异常并手动通知客户端的方式来解决此问题。示例代码如下:
ConfigChange notification = null;
try {
notification = configService.getConfig(config, namespace, dataId, timeout);
} catch (ApolloConfigException ex) {
logger.error("getConfig failed!", ex);
}
if (notification != null) {
// notify clients
notify(innerRequest, notification);
} else {
logger.warn("No change found for {}", innerRequest);
}