Skip to content

Commit 1864050

Browse files
committed
more explicit exception message
1 parent 38fa03f commit 1864050

File tree

1 file changed

+1
-1
lines changed
  • powertools-validation/src/main/java/software/amazon/lambda/powertools/validation

1 file changed

+1
-1
lines changed

powertools-validation/src/main/java/software/amazon/lambda/powertools/validation/ValidationUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static void validate(Object obj, JsonSchema jsonSchema, String envelope)
7676
Expression<JsonNode> expression = ValidationConfig.get().getJmesPath().compile(envelope);
7777
subNode = expression.search(jsonNode);
7878
if (subNode == null || subNode instanceof NullNode) {
79-
throw new ValidationException("Not found");
79+
throw new ValidationException("Envelope not found in the object");
8080
}
8181
} catch (Exception e) {
8282
throw new ValidationException("Cannot find envelope <"+envelope+"> in the object <"+obj+">", e);

0 commit comments

Comments
 (0)