Skip to content

Commit

Permalink
Avoid potential NPE
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
  • Loading branch information
abalarev committed May 9, 2022
1 parent 31a8505 commit 18a01c0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ private void handleExecutePiggyBack(final ExecutePiggybackCommand command) {
JsonValue.of(Objects.toString(result)), DittoHeaders.empty());
} else {
devOpsCommandResponse = getErrorResponse(command,
AskException.fromMessage(error.getMessage(), DittoHeaders.empty()).toJson());
AskException.fromMessage(error != null ? error.getMessage() : "Unknown error occurred.",
DittoHeaders.empty()).toJson());
}
sender.tell(devOpsCommandResponse, getSelf());
});
Expand Down

0 comments on commit 18a01c0

Please sign in to comment.