We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd941eb commit 0a01141Copy full SHA for 0a01141
handlers/runtime_server.go
@@ -17,9 +17,11 @@ package handlers
17
18
import (
19
"fmt"
20
+ "strings"
21
22
"github.com/go-openapi/runtime/middleware"
23
client_native "github.com/haproxytech/client-native/v4"
24
+ native_errors "github.com/haproxytech/client-native/v4/errors"
25
"github.com/haproxytech/client-native/v4/models"
26
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)
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
+}
0 commit comments