Skip to content

Commit 5ec413f

Browse files
committed
pkg/bindings/containers: handle ignore for stop
When the client gets a 404 back we know the container does not exists, if ignore is set as well we should just ignore the error client side. seen in #23554 Signed-off-by: Paul Holzinger <[email protected]>
1 parent 6fce734 commit 5ec413f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/bindings/containers/containers.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,9 @@ func Stop(ctx context.Context, nameOrID string, options *StopOptions) error {
405405
return err
406406
}
407407
defer response.Body.Close()
408+
if options.GetIgnore() && response.StatusCode == http.StatusNotFound {
409+
return nil
410+
}
408411

409412
return response.Process(nil)
410413
}

0 commit comments

Comments
 (0)