Skip to content

Commit

Permalink
Change error to InernalError
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Long committed May 29, 2020
1 parent b983af2 commit de1d082
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/apis/kops/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package validation

import (
"errors"
"fmt"
"net"
"regexp"
Expand Down Expand Up @@ -643,7 +644,7 @@ func validateCalicoAutoDetectionMethod(fldPath *field.Path, runtime string, vers
return utilvalidation.IsValidIPv6Address(fldPath, destStr)
}

return field.ErrorList{field.Invalid(fldPath, runtime, "IP version is incorrect")}
return field.ErrorList{field.InternalError(fldPath, errors.New("IP version is incorrect"))}
case "interface":
ifRegexes := regexp.MustCompile(`\s*,\s*`).Split(method[1], -1)
if len(ifRegexes) == 0 || ifRegexes[0] == "" {
Expand Down

0 comments on commit de1d082

Please sign in to comment.