paypal / load-watcher

Load watcher is a cluster-wide aggregator of metrics, developed for Trimaran: Real Load Aware Scheduler in Kubernetes.
Other
63 stars 33 forks source link

GetLatestWatcherMetrics did not return proper error #27

Closed wangchen615 closed 3 years ago

wangchen615 commented 3 years ago

GetLatestWatcherMetrics can return nil, nil in case of e.g. HTTP error code 403. (https://github.com/paypal/load-watcher/blob/6c7e96e582364641e5015a7c455327701dbd85f0/pkg/watcher/api/client.go#L107) Why GetLatestWatcherMetrics return nil, nil instead of just returning a proper error in this case?

@zorro786

zorro786 commented 3 years ago

@wangchen615 Looks like a bug, should return err there.