From 80fd0fa90441863886ec80486e64de45a3a70f48 Mon Sep 17 00:00:00 2001 From: Liu Bin Date: Thu, 12 Jul 2018 22:45:07 +0800 Subject: [PATCH] Log more detailed error info when failfast=true and error happened (#1082) * when failfast=true, client can log detailed error info --- .../config/client/ConfigServicePropertySourceLocator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServicePropertySourceLocator.java b/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServicePropertySourceLocator.java index 176390bb..da848a6b 100644 --- a/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServicePropertySourceLocator.java +++ b/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServicePropertySourceLocator.java @@ -134,8 +134,8 @@ public class ConfigServicePropertySourceLocator implements PropertySourceLocator } if (properties.isFailFast()) { throw new IllegalStateException( - "Could not locate PropertySource and the fail fast property is set, failing", - error); + "Could not locate PropertySource and the fail fast property is set, failing" + + (errorBody == null ? "" : ": " + errorBody), error); } logger.warn("Could not locate PropertySource: " + (errorBody == null ? error == null ? "label not found" : error.getMessage()