We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c64af32 commit 473de71Copy full SHA for 473de71
src/main/java/com/cucumber/tutorial/util/PlainHttpResponseUtils.java
@@ -31,8 +31,12 @@ public static PlainHttpResponse from(String content) {
31
try {
32
return mapper.readValue(content, PlainHttpResponse.class);
33
} catch (JsonProcessingException e) {
34
- throw new RuntimeException("Cannot convert to PlainHttpResponse object:\n" + content, e);
35
- }
+ throw new RuntimeException("Cannot convert to PlainHttpResponse object:\n" + content+"\n\nExpected:\n{\n" +
+ " [optional] \"status\": <object>,\n" +
36
+ " [optional] \"reason\": \"<text>\",\n" +
37
+ " [optional] \"body\": <object>,\n" +
38
+ " [optional] \"headers\": <json array> ex: [ {\"h1\": \"v1\"}, {\"h2\": \"v2\"} ]\n" +
39
+ "}", e); }
40
}
41
42
public static PlainHttpResponse from(ClassicHttpResponse response) {
0 commit comments