Skip to content

Commit

Permalink
Fix verification error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tilovillwock committed Dec 11, 2024
1 parent dc8ebe5 commit c80d9c7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ RegistrationResponse register(List<VariableMetadata> variables) throws Registrat
if (responseNode.path("constraintViolation").isArray()) {
var violations = Stream.of((ArrayNode) responseNode.path("constraintViolation"))
.map(JsonNode::toPrettyString).toList();
throw new VerificationException(violations);
if (!violations.isEmpty()) {
throw new VerificationException(violations);
}
}
// register variables
response = this.restTemplate.postForEntity(this.getRegistationEndpoint(), entity, String.class);
Expand Down

0 comments on commit c80d9c7

Please sign in to comment.