We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ad973a commit 03450b5Copy full SHA for 03450b5
api/v1beta1/disruption_types.go
@@ -885,6 +885,18 @@ func (s DisruptionSpec) DisruptionCount() int {
885
886
// Explain returns a string explanation of this disruption spec
887
func (s DisruptionSpec) Explain() []string {
888
+ if err := s.Validate(); err != nil {
889
+ retErr := []string{"We were not able to explain this spec as it is not valid."}
890
+
891
+ if merr, ok := err.(*multierror.Error); ok {
892
+ for _, e := range merr.Errors {
893
+ retErr = append(retErr, e.Error())
894
+ }
895
896
897
+ return retErr
898
899
900
var explanation []string
901
explanation = append(explanation, "Here's our best explanation of what this spec will do when run:")
902
0 commit comments