File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,11 @@ package handlers
1717
1818import (
1919 "fmt"
20+ "strings"
2021
2122 "github.com/go-openapi/runtime/middleware"
2223 client_native "github.com/haproxytech/client-native/v4"
24+ native_errors "github.com/haproxytech/client-native/v4/errors"
2325 "github.com/haproxytech/client-native/v4/models"
2426
2527 "github.com/haproxytech/dataplaneapi/misc"
@@ -139,3 +141,9 @@ func (h *ReplaceRuntimeServerHandlerImpl) Handle(params server.ReplaceRuntimeSer
139141
140142 return server .NewReplaceRuntimeServerOK ().WithPayload (rs )
141143}
144+
145+ func isNotFoundError (err error ) bool {
146+ msg := err .Error ()
147+ return strings .Contains (msg , "No such backend" ) ||
148+ strings .Contains (msg , native_errors .ErrNotFound .Error ())
149+ }
You can’t perform that action at this time.
0 commit comments