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
17
17
18
18
import (
19
19
"fmt"
20
+ "strings"
20
21
21
22
"github.com/go-openapi/runtime/middleware"
22
23
client_native "github.com/haproxytech/client-native/v4"
24
+ native_errors "github.com/haproxytech/client-native/v4/errors"
23
25
"github.com/haproxytech/client-native/v4/models"
24
26
25
27
"github.com/haproxytech/dataplaneapi/misc"
@@ -139,3 +141,9 @@ func (h *ReplaceRuntimeServerHandlerImpl) Handle(params server.ReplaceRuntimeSer
139
141
140
142
return server .NewReplaceRuntimeServerOK ().WithPayload (rs )
141
143
}
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