summaryrefslogtreecommitdiffstats
path: root/configserver/src/main/java/com/yahoo/vespa/config/server/application/Application.java
diff options
context:
space:
mode:
Diffstat (limited to 'configserver/src/main/java/com/yahoo/vespa/config/server/application/Application.java')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/application/Application.java19
1 files changed, 7 insertions, 12 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/application/Application.java b/configserver/src/main/java/com/yahoo/vespa/config/server/application/Application.java
index e8764350313..4928663c3b0 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/application/Application.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/application/Application.java
@@ -123,19 +123,13 @@ public class Application implements ModelResult {
throw new UnknownConfigDefinitionException("Unable to find config definition for '" + configKey.getNamespace() + "." + configKey.getName());
}
configKey = new ConfigKey<>(configDefinitionWrapper.getDefKey().getName(), configKey.getConfigId(), configDefinitionWrapper.getDefKey().getNamespace());
- ConfigPayload payload;
- try {
- if (logDebug()) {
- debug("Resolving " + configKey + " with targetDef=" + def);
- }
-
- payload = model.getConfig(
- configKey,
- def,
- null); // TODO Remove this argument when possible
- } catch (IOException e) {
+ if (logDebug()) {
+ debug("Resolving " + configKey + " with targetDef=" + def);
+ }
+ ConfigPayload payload = model.getConfig(configKey,def,null); // TODO Remove last argument when possible
+ if (payload == null) {
metricUpdater.incrementFailedRequests();
- throw new ConfigurationRuntimeException("Unable to resolve config", e);
+ throw new ConfigurationRuntimeException("Unable to resolve config " + configKey);
}
ConfigResponse configResponse = responseFactory.createResponse(payload, def.getCNode(), appGeneration);
@@ -183,6 +177,7 @@ public class Application implements ModelResult {
return resolveConfig(req, new UncompressedConfigResponseFactory());
}
+ // TODO: Remove 'throws IOException'
public <CONFIGTYPE extends ConfigInstance> CONFIGTYPE getConfig(Class<CONFIGTYPE> configClass, String configId) throws IOException {
ConfigKey<CONFIGTYPE> key = new ConfigKey<>(configClass, configId);
ConfigPayload payload = model.getConfig(key, (ConfigDefinition)null, null);