Skip to content

Commit

Permalink
fix: do not exit argocd sync loop when status response is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
bbortt committed Sep 20, 2024
1 parent ed812dd commit d31e6d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/argo_cd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ impl ArgoCD {
.expect("Failed to request ArgoCD sync status");

if response.status().is_success() {
let app_information: Application = self
.rt
.block_on(response.json())
.expect("Failed to read ArgoCD sync status response");
let app_information = match self.rt.block_on(response.json::<Application>()).ok() {
Some(app) => app,
None => continue,
};

debug!("ArgoCD sync status response: {:?}", app_information);

Expand Down

0 comments on commit d31e6d5

Please sign in to comment.