Skip to content

Commit

Permalink
fix(saga): Avoid retrying if we get a 404 back from clouddriver (#3880)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajordens committed Aug 27, 2020
1 parent c1a3a89 commit 22ce747
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -178,6 +178,14 @@ class MonitorKatoTask implements RetryableTask, CloudProviderAware {
try {
kato.resumeTask(katoTask.id)
} catch (Exception e) {
if (e instanceof RetrofitError) {
RetrofitError retrofitError = (RetrofitError) e
if (retrofitError?.response?.status == 404) {
// unexpected -- no sense attempting to resume a saga that `clouddriver` has no knowledge about
throw e
}
}

// Swallow the exception; we'll let Orca retry the next time around.
log.error("Request failed attempting to resume task", e)
}
Expand Down

0 comments on commit 22ce747

Please sign in to comment.