Skip to content

Commit 922cd53

Browse files
authored
Merge pull request #2459 from arkodg/fix-error-check
Fix Error Check in NewNetwork
2 parents 0025177 + 7e575b8 commit 922cd53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ func (c *controller) NewNetwork(networkType, name string, id string, options ...
825825

826826
err = c.addNetwork(network)
827827
if err != nil {
828-
if strings.Contains(err.Error(), "restoring existing network") {
828+
if _, ok := err.(types.MaskableError); ok {
829829
// This error can be ignored and set this boolean
830830
// value to skip a refcount increment for configOnly networks
831831
skipCfgEpCount = true

0 commit comments

Comments
 (0)