Skip to content

Commit

Permalink
fix: ignore the 403 returned from argocd when creating new app (#187)
Browse files Browse the repository at this point in the history
argocd returns 403 if an app doesn't exist; this logic was just wrong
  • Loading branch information
djeebus authored Apr 11, 2024
1 parent f48a265 commit 1002f98
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/checks/diff/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,14 @@ func getResources(ctx context.Context, request checks.Request) ([]*argoappv1.Res
ApplicationName: &request.App.Name,
})
if err != nil {
if !isAppMissingErr(err) {
telemetry.SetError(span, err, "Get Argo Managed Resources")
if isAppMissingErr(err) {
span.RecordError(err)
return nil, nil
}

resources = new(application.ManagedResourcesResponse)
return nil, err
}
return resources.Items, err
return resources.Items, nil
}

func getArgoSettings(ctx context.Context, request checks.Request) (*settings.Settings, error) {
Expand Down

0 comments on commit 1002f98

Please sign in to comment.