Skip to content

Commit

Permalink
Remove original cr yaml from error message (istio#594)
Browse files Browse the repository at this point in the history
* Remove original cr yaml from logging

* fix lint
  • Loading branch information
richardwxn authored and istio-testing committed Nov 21, 2019
1 parent 9f96fae commit ade03ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/mesh/profile-dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,11 @@ func unmarshalAndValidateICP(crYAML string, force bool) (*v1alpha2.IstioControlP
}
icps, _, err := manifest.ParseK8SYAMLToIstioControlPlaneSpec(crYAML)
if err != nil {
return nil, "", fmt.Errorf("could not unmarshal the overlay file: %s\n\nOriginal YAML:\n%s", err, crYAML)
return nil, "", fmt.Errorf("could not unmarshal the overlay file: %s", err)
}
if errs := validate.CheckIstioControlPlaneSpec(icps, false); len(errs) != 0 {
if !force {
return nil, "", fmt.Errorf("input file failed validation with the following errors: %s\n\nOriginal YAML:\n%s", errs, crYAML)
return nil, "", fmt.Errorf("input file failed validation with the following errors: %s", errs)
}
}
icpsYAML, err := util.MarshalWithJSONPB(icps)
Expand Down

0 comments on commit ade03ac

Please sign in to comment.