Skip to content

Commit c2f0453

Browse files
committed
More details if response cannot be parsed
1 parent d4853c6 commit c2f0453

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/se/bjurr/violations/comments/bitbucketserver/lib/client/BitbucketServerClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ private <T> T invokeAndParse(String url, String jsonPath) {
5353
try {
5454
return JsonPath.read(json, jsonPath);
5555
} catch (Exception e) {
56-
throw e;
56+
throw new RuntimeException("Unable to parse diff response from " + url + " using " + jsonPath + "\n\n" + json, e);
5757
}
5858
}
5959

@@ -90,7 +90,7 @@ public BitbucketServerDiffResponse pullRequestDiff() {
9090
try {
9191
return new Gson().fromJson(json, BitbucketServerDiffResponse.class);
9292
} catch (Exception e) {
93-
throw e;
93+
throw new RuntimeException("Unable to parse diff response from " + url + "\n\n" + json, e);
9494
}
9595
}
9696

0 commit comments

Comments
 (0)