From 67f2c3994968f616595f3126ba2644fb29554532 Mon Sep 17 00:00:00 2001 From: Anders Stigaard Date: Mon, 8 Dec 2025 14:25:26 +0100 Subject: [PATCH] ignor 404 when deleting source and bundle --- pkg/ocp/bundles.go | 2 +- pkg/ocp/sources.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/ocp/bundles.go b/pkg/ocp/bundles.go index a3aad0e7..4e3b1e0e 100644 --- a/pkg/ocp/bundles.go +++ b/pkg/ocp/bundles.go @@ -141,7 +141,7 @@ func (c *Client) DeleteBundle(ctx context.Context, name string) (err error) { return errors.Wrap(err, "DeleteBundle: could not read body") } - if res.StatusCode != http.StatusOK { + if res.StatusCode != http.StatusNotFound && res.StatusCode != http.StatusOK { return httperror.NewHTTPError(res.StatusCode, string(body)) } return nil diff --git a/pkg/ocp/sources.go b/pkg/ocp/sources.go index a7a74641..15296c4e 100644 --- a/pkg/ocp/sources.go +++ b/pkg/ocp/sources.go @@ -226,7 +226,7 @@ func (c *Client) DeleteSource(ctx context.Context, id string) (err error) { return errors.Wrap(err, "DeleteSource: could not read body") } - if res.StatusCode != http.StatusOK { + if res.StatusCode != http.StatusNotFound && res.StatusCode != http.StatusOK { return httperror.NewHTTPError(res.StatusCode, string(body)) } return nil