Skip to content

Commit

Permalink
fix(appDelete): Handle retrofit exceptions with no response object. (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
jtk54 authored Jan 17, 2019
1 parent 6f2b81e commit 1bdd044
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ class VerifyApplicationHasNoDependenciesTask implements Task {
existingDependencyTypes << "security groups"
}
} catch (RetrofitError e) {
if (e.response?.status != 404) {
if (!e.response) {
def exception = [operation: stage.tasks[-1].name, reason: e.message]
return new TaskResult(ExecutionStatus.TERMINAL, [exception: exception])
} else if (e.response && e.response.status && e.response.status != 404) {
def resp = e.response
def exception = [statusCode: resp.status, operation: stage.tasks[-1].name, url: resp.url, reason: resp.reason]
try {
Expand Down

0 comments on commit 1bdd044

Please sign in to comment.