mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 11:38:15 +00:00
add error string reference
This commit is contained in:
parent
89e70760d7
commit
5052f3aed0
@ -329,10 +329,13 @@ func IsNotFoundError(err error) bool {
|
|||||||
es := err.Error()
|
es := err.Error()
|
||||||
if strings.Contains(es, "does not exist") {
|
if strings.Contains(es, "does not exist") {
|
||||||
// set with the same name already exists
|
// set with the same name already exists
|
||||||
|
// xref: https://github.com/Olipro/ipset/blob/master/lib/errcode.c#L32-L33
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if strings.Contains(es, "element is missing") {
|
if strings.Contains(es, "element is missing") {
|
||||||
// entry is missing from the set
|
// entry is missing from the set
|
||||||
|
// xref: https://github.com/Olipro/ipset/blob/master/lib/parse.c#L1904
|
||||||
|
// https://github.com/Olipro/ipset/blob/master/lib/parse.c#L1925
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user