private ControllerConfig getControllerConfig(Ric ric) throws ServiceException {
String controllerName = ric.getConfig().controllerName();
if (controllerName.isEmpty()) {
- throw new ServiceException("NO controller configured for RIC: " + ric.name());
+ throw new ServiceException("No controller configured for RIC: " + ric.name());
}
return this.appConfig.getControllerConfig(controllerName);
}
.onErrorResume(notUsed -> fetchVersion(ric, A1ProtocolType.SDNC_ONAP)) //
.doOnNext(ric::setProtocolVersion)
.doOnNext(version -> logger.debug("Established protocol version:{} for Ric: {}", version, ric.name())) //
- .doOnError(notUsed -> logger.warn("Could not get protocol version from RIC: {}", ric.name())); //
+ .doOnError(notUsed -> logger.warn("Could not get protocol version from RIC: {}", ric.name())) //
+ .onErrorResume(
+ notUsed -> Mono.error(new ServiceException("Protocol negotiation failed for " + ric.name())));
} else {
return Mono.just(ric.getProtocolVersion());
}