updated bad request message

This commit is contained in:
Francesco Mangiacrapa 2024-04-04 10:42:56 +02:00
parent 3edd9b81de
commit 29fd3428c5
2 changed files with 24 additions and 10 deletions

View File

@ -18,6 +18,7 @@
<wb-module deploy-name="uri-resolver-2.10.0-SNAPSHOT">
@ -39,6 +40,7 @@
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
@ -60,6 +62,7 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
@ -81,6 +84,7 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
@ -102,8 +106,13 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="uri-resolver-manager-1.8.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/uri-resolver-manager/uri-resolver-manager">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -144,6 +153,7 @@
<property name="java-output-path" value="/uri-resolver/target/classes"/>
@ -165,6 +175,7 @@
</wb-module>
@ -186,5 +197,6 @@
</project-modules>

View File

@ -230,8 +230,10 @@ public class GeoportalResolver {
LOG.error("Target application parameter is malformed");
List<String> targetApps = Arrays.asList(TargetAppGeoportalCodes.values()).stream()
.map(TargetAppGeoportalCodes::getTarget_app).collect(Collectors.toList());
List<String> targetPaths = Arrays.asList(TargetAppGeoportalCodes.values()).stream()
.map(TargetAppGeoportalCodes::getId).collect(Collectors.toList());
throw ExceptionManager.badRequestException(req,
"Target application is wrong. It must be one value of: " + targetApps, this.getClass(),
"Target application is wrong. Add a target path as /"+targetPaths+"+ values of the applications: " + targetApps, this.getClass(),
helpURI);
}
}