Skip to content

Commit 100e66a

Browse files
committed
[ZEPPELIN-5436] NPE in ZeppelinClient
1 parent ec69154 commit 100e66a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

zeppelin-client/src/main/java/org/apache/zeppelin/client/ZeppelinClient.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ private void checkResponse(HttpResponse<JsonNode> response) throws Exception {
8888
}
8989
if (response.getStatus() != 200) {
9090
String message = response.getStatusText();
91-
if (response.getBody().getObject().has("message")) {
91+
if (response.getBody() != null &&
92+
response.getBody().getObject() != null &&
93+
response.getBody().getObject().has("message")) {
9294
message = response.getBody().getObject().getString("message");
9395
}
9496
throw new Exception(String.format("Unable to call rest api, status: %s, statusText: %s, message: %s",

0 commit comments

Comments
 (0)