File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ func (a *awsInstance) start() {
189
189
if err = a .updateServices (api ); err != nil {
190
190
switch t := err .(type ) {
191
191
case * configuration.ConfError :
192
- switch t .Code () {
192
+ switch t .Err () {
193
193
case configuration .ErrObjectAlreadyExists :
194
194
continue
195
195
default :
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ require (
22
22
github.com/go-openapi/validate v0.22.1
23
23
github.com/google/renameio v1.0.1
24
24
github.com/google/uuid v1.3.1
25
- github.com/haproxytech/client-native/v5 v5.0.1-0.20230921091007-23efe063cddc
25
+ github.com/haproxytech/client-native/v5 v5.0.1-0.20231011083306-519f1b08727d
26
26
github.com/haproxytech/config-parser/v5 v5.0.1-0.20230913105857-585d83cb48ba
27
27
github.com/jessevdk/go-flags v1.5.0
28
28
github.com/json-iterator/go v1.1.12
Original file line number Diff line number Diff line change @@ -133,8 +133,8 @@ github.com/google/renameio v1.0.1/go.mod h1:t/HQoYBZSsWSNK35C6CO/TpPLDVWvxOHboWU
133
133
github.com/google/uuid v1.1.1 /go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo =
134
134
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4 =
135
135
github.com/google/uuid v1.3.1 /go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo =
136
- github.com/haproxytech/client-native/v5 v5.0.1-0.20230921091007-23efe063cddc h1:xo21KZBRB0R5Q4lQFnFWaUt3pSWNYRpM41xv8LmY6UY =
137
- github.com/haproxytech/client-native/v5 v5.0.1-0.20230921091007-23efe063cddc /go.mod h1:hJEZYIr/vXYKZDLHZXqZIncYJwvQ3evKyQ1xgEtQwhs =
136
+ github.com/haproxytech/client-native/v5 v5.0.1-0.20231011083306-519f1b08727d h1:AKVD4wYLkrsFDsdAe1zFhkl6UlkP/tKnsR6Pd9PdwEg =
137
+ github.com/haproxytech/client-native/v5 v5.0.1-0.20231011083306-519f1b08727d /go.mod h1:hJEZYIr/vXYKZDLHZXqZIncYJwvQ3evKyQ1xgEtQwhs =
138
138
github.com/haproxytech/config-parser/v5 v5.0.1-0.20230913105857-585d83cb48ba h1:l4oTCSr7nrZ9vZ7VVJ5GX64BRtZLuD9ePG8B5clbjHI =
139
139
github.com/haproxytech/config-parser/v5 v5.0.1-0.20230913105857-585d83cb48ba /go.mod h1:ASOyT1KguwXaY0NfoLNjLLs0OlnYHnFgUJsdJe6NhZg =
140
140
github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE =
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ func HandleError(err error) *models.Error {
78
78
case * configuration.ConfError :
79
79
msg := t .Error ()
80
80
httpCode := ErrHTTPInternalServerError
81
- switch t .Code () {
81
+ switch t .Err () {
82
82
case configuration .ErrObjectDoesNotExist :
83
83
httpCode = ErrHTTPNotFound
84
84
case configuration .ErrObjectAlreadyExists , configuration .ErrVersionMismatch , configuration .ErrTransactionAlreadyExists :
@@ -107,7 +107,7 @@ func HandleError(err error) *models.Error {
107
107
// HandleContainerGetError translates error codes from client native into models.Error with appropriate http status code. Intended for get requests on container endpoints.
108
108
func HandleContainerGetError (err error ) * models.Error {
109
109
if t , ok := err .(* configuration.ConfError ); ok {
110
- if t .Code () == configuration .ErrParentDoesNotExist {
110
+ if t .Is ( configuration .ErrParentDoesNotExist ) {
111
111
code := ErrHTTPOk
112
112
return & models.Error {Code : & code }
113
113
}
@@ -192,7 +192,7 @@ func ParseTimeout(tOut string) *int64 {
192
192
}
193
193
194
194
func GetHTTPStatusFromConfErr (err * configuration.ConfError ) int {
195
- switch err .Code () {
195
+ switch err .Err () {
196
196
case configuration .ErrObjectDoesNotExist :
197
197
return http .StatusNotFound
198
198
case configuration .ErrObjectAlreadyExists :
You can’t perform that action at this time.
0 commit comments