diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/result/JsonPathResultMatchers.java b/spring-test/src/main/java/org/springframework/test/web/servlet/result/JsonPathResultMatchers.java index 48ff721ef1..fe33f1073d 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/result/JsonPathResultMatchers.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/result/JsonPathResultMatchers.java @@ -260,7 +260,7 @@ public class JsonPathResultMatchers { return content.substring(this.prefix.length()); } catch (StringIndexOutOfBoundsException ex) { - throw new AssertionError("JSON prefix \"" + this.prefix + "\" not found", ex); + throw new AssertionError("JSON prefix \"" + this.prefix + "\" not found: " + ex); } } else {