From ace8132edcbf0450dba1df49f6142143f072897d Mon Sep 17 00:00:00 2001 From: Brian Pursley Date: Wed, 18 Jan 2023 21:37:13 -0500 Subject: [PATCH] Improve panic error message to include the parse error. --- kyaml/openapi/openapi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kyaml/openapi/openapi.go b/kyaml/openapi/openapi.go index 69762775e..1caea811d 100644 --- a/kyaml/openapi/openapi.go +++ b/kyaml/openapi/openapi.go @@ -609,7 +609,7 @@ func initSchema() { if customSchema != nil { err := parse(customSchema, JsonOrYaml) if err != nil { - panic("invalid schema file") + panic(fmt.Errorf("invalid schema file: %w", err)) } } else { if kubernetesOpenAPIVersion == "" {