From 7e4a3ac321b51583718e51e78ea2a7f000ea29cc Mon Sep 17 00:00:00 2001 From: Vladimir Pouzanov Date: Fri, 21 Jul 2017 17:45:23 +0100 Subject: [PATCH 1/2] Fixed the ambiguous error message --- core/pkg/ingress/annotations/authtls/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/pkg/ingress/annotations/authtls/main.go b/core/pkg/ingress/annotations/authtls/main.go index 7db7f97c1..67c436738 100644 --- a/core/pkg/ingress/annotations/authtls/main.go +++ b/core/pkg/ingress/annotations/authtls/main.go @@ -81,7 +81,7 @@ func (a authTLS) Parse(ing *extensions.Ingress) (interface{}, error) { _, _, err = k8s.ParseNameNS(tlsauthsecret) if err != nil { - return &AuthSSLConfig{}, ing_errors.NewLocationDenied("an empty string is not a valid secret name") + return &AuthSSLConfig{}, ing_errors.NewLocationDenied("secret name must include the namespace") } tlsdepth, err := parser.GetIntAnnotation(annotationAuthTLSDepth, ing) From 113b3c75e8532010d5e6310f1d5b40e0b3bb236f Mon Sep 17 00:00:00 2001 From: Vladimir Pouzanov Date: Tue, 1 Aug 2017 18:36:01 +0100 Subject: [PATCH 2/2] Pass through the original error text --- core/pkg/ingress/annotations/authtls/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/pkg/ingress/annotations/authtls/main.go b/core/pkg/ingress/annotations/authtls/main.go index 67c436738..2e140f746 100644 --- a/core/pkg/ingress/annotations/authtls/main.go +++ b/core/pkg/ingress/annotations/authtls/main.go @@ -81,7 +81,7 @@ func (a authTLS) Parse(ing *extensions.Ingress) (interface{}, error) { _, _, err = k8s.ParseNameNS(tlsauthsecret) if err != nil { - return &AuthSSLConfig{}, ing_errors.NewLocationDenied("secret name must include the namespace") + return &AuthSSLConfig{}, ing_errors.NewLocationDenied(err.Error()) } tlsdepth, err := parser.GetIntAnnotation(annotationAuthTLSDepth, ing)