SI-2506 hide error messages
diff --git a/addressImport/src/main/resources/application.yml b/addressImport/src/main/resources/application.yml
index 712829e..7abdedd 100644
--- a/addressImport/src/main/resources/application.yml
+++ b/addressImport/src/main/resources/application.yml
@@ -18,6 +18,8 @@
server:
max-http-header-size: 262144
+ error:
+ include-message: never
utm:
zoneNumber: 32
diff --git a/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/config/ExceptionHandlerConfig.java b/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/config/ExceptionHandlerConfig.java
new file mode 100644
index 0000000..85a5ea6
--- /dev/null
+++ b/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/config/ExceptionHandlerConfig.java
@@ -0,0 +1,37 @@
+package org.eclipse.openk.gridfailureinformation.config;
+
+import org.springframework.boot.web.servlet.error.DefaultErrorAttributes;
+import org.springframework.boot.web.servlet.error.ErrorAttributes;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.context.request.WebRequest;
+
+import java.util.Map;
+
+@Configuration
+public class ExceptionHandlerConfig {
+ public static final String KEY_STATUS = "status";
+ public static final String KEY_ERROR = "error";
+ public static final String KEY_MESSAGE = "message";
+ public static final String KEY_TIMESTAMP = "timestamp";
+ public static final String KEY_ERRORS = "errors";
+
+ @Bean
+ public ErrorAttributes errorAttributes() {
+ return new DefaultErrorAttributes() {
+
+ @Override
+ public Map<String ,Object> getErrorAttributes(
+ WebRequest webRequest
+ ,boolean includeStackTrace
+ ) {
+ Map<String ,Object> defaultMap
+ = super.getErrorAttributes( webRequest , false );
+
+ defaultMap.put(KEY_MESSAGE, "");
+
+ return defaultMap;
+ }
+ };
+ }
+}
\ No newline at end of file