diff --git a/orca-mine/src/main/groovy/com/netflix/spinnaker/orca/mine/tasks/RegisterCanaryTask.groovy b/orca-mine/src/main/groovy/com/netflix/spinnaker/orca/mine/tasks/RegisterCanaryTask.groovy index ac56935e2e..41510858cd 100644 --- a/orca-mine/src/main/groovy/com/netflix/spinnaker/orca/mine/tasks/RegisterCanaryTask.groovy +++ b/orca-mine/src/main/groovy/com/netflix/spinnaker/orca/mine/tasks/RegisterCanaryTask.groovy @@ -62,7 +62,8 @@ class RegisterCanaryTask implements Task { } catch (RetrofitError re) { def response = [:] try { - response = re.getBodyAs(Map) as Map + def responseBody = re.getBodyAs(Map) as Map + response = responseBody!=null ? responseBody : response } catch (Exception e) { response.error = e.message }