Skip to content

Commit

Permalink
refactor(travisService/test): added null check to response body
Browse files Browse the repository at this point in the history
 refactor(travisService/test):  response body could be null for eg when a json converter is unable to convert non-json format
  • Loading branch information
SheetalAtre committed Sep 11, 2023
1 parent aa4f0bc commit 1fdde08
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ private Optional<String> getAndCacheJobLog(int jobId) {
if (e instanceof SpinnakerHttpException) { // only SpinnakerHttpException has a response body
try {
Map<String, Object> body = ((SpinnakerHttpException) e).getResponseBody();
if ("log_expired".equals(body.get("error_type"))) {
if (body != null && "log_expired".equals(body.get("error_type"))) {
log.info(
"{}: The log for job id {} has expired and the corresponding build was ignored",
groupKey,
Expand Down

0 comments on commit 1fdde08

Please sign in to comment.