Skip to content

Commit

Permalink
refactor(web): no need to wrap SpinnakerHttpException
Browse files Browse the repository at this point in the history
since it has a retryable property
  • Loading branch information
dbyron-sf committed Sep 19, 2023
1 parent fa41425 commit 5de31f6
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import com.netflix.spinnaker.igor.service.BuildOperations;
import com.netflix.spinnaker.igor.service.BuildProperties;
import com.netflix.spinnaker.kork.core.RetrySupport;
import com.netflix.spinnaker.kork.exceptions.SpinnakerException;
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerConversionException;
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerHttpException;
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerNetworkException;
Expand Down Expand Up @@ -329,9 +328,8 @@ private Response getPropertyFile(String jobName, Integer buildNumber, String fil
if (e.getResponseCode() == 404 || e.getResponseCode() >= 500) {
throw e; // retry on 404 and 5XX
}
SpinnakerException ex = new SpinnakerException(e);
ex.setRetryable(false); // disable retry
throw ex;
e.setRetryable(false); // disable retry
throw e;
} catch (SpinnakerNetworkException e) {
throw e; // retry on network issue
} catch (SpinnakerServerException e) {
Expand Down

0 comments on commit 5de31f6

Please sign in to comment.