error is coming back nil sometimes

this does not fix the root issue that is causing a nil error
This commit is contained in:
Shane Starcher 2019-05-14 15:51:12 -07:00
parent af69d1ba97
commit 081107bb82
1 changed files with 3 additions and 0 deletions

View File

@ -340,6 +340,9 @@ func (e *Error) Error() string {
} else { } else {
msgs := []string{} msgs := []string{}
for i, err := range e.Errors { for i, err := range e.Errors {
if err == nil {
continue
}
msgs = append(msgs, fmt.Sprintf("err %d: %v", i, err.Error())) msgs = append(msgs, fmt.Sprintf("err %d: %v", i, err.Error()))
} }
cause = fmt.Sprintf("%d errors:\n%s", len(e.Errors), strings.Join(msgs, "\n")) cause = fmt.Sprintf("%d errors:\n%s", len(e.Errors), strings.Join(msgs, "\n"))