mirror of
https://github.com/kemko/nomad.git
synced 2026-01-02 00:15:43 +03:00
When the service client syncs to Consul, we accumulate service sync errors in a multierror before reading all the local checks. If the API call to the local checks fails, we either return that error or append it to the multierror and return the set of errors. But `multierror.Error.Len()` doesn't nil-check, so we need to do this ourselves. I've also made a quick pass through the rest of the code base looking for multierror `Len` method calls to see if we have this pattern elsewhere. Fixes: https://github.com/hashicorp/nomad/issues/24512