Merge branch 'develop' of 10.10.31.70:/ervu-eks into develop

This commit is contained in:
Maksim Tereshin 2024-12-09 21:10:07 +01:00
commit 267d441f69
No known key found for this signature in database
2 changed files with 10 additions and 4 deletions

View file

@ -8,6 +8,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
@ -81,13 +82,15 @@ public class ConfigExecutorService {
catch (HttpClientErrorException e) { catch (HttpClientErrorException e) {
if (e.getStatusCode() == HttpStatus.BAD_REQUEST) { if (e.getStatusCode() == HttpStatus.BAD_REQUEST) {
Map<String, String> responseMap = new Gson().fromJson(e.getResponseBodyAsString(), Map<String, Object> responseMap = new Gson().fromJson(e.getResponseBodyAsString(),
new TypeToken<Map<String, String>>() { new TypeToken<Map<String, Object>>() {
}.getType() }.getType()
); );
String details = responseMap.get("details"); @SuppressWarnings("unchecked")
throw new ConfigExecutorException(details); Map<String, String> details = (Map<String, String>) responseMap.get("details");
String detailsStr = String.join("\n", details.values());
throw new ConfigExecutorException(detailsStr);
} }
else { else {
throw new RuntimeException( throw new RuntimeException(

View file

@ -1 +1,4 @@
configDirectory: C:\work\ervu-eks\config\cde-xml configDirectory: C:\work\ervu-eks\config\cde-xml
logging:
level:
root: info