Skip to content

Commit d31e6d5

Browse files
committed
fix: do not exit argocd sync loop when status response is empty
1 parent ed812dd commit d31e6d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/argo_cd.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ impl ArgoCD {
177177
.expect("Failed to request ArgoCD sync status");
178178

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

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

0 commit comments

Comments
 (0)