diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-09-21 09:45:19 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-09-21 09:46:17 +0200 |
commit | 3fdb83a2eed3bd1aa21d1896f6e981476e64e97c (patch) | |
tree | 0c3a43de801bbe0a72ac455db8fef21507480f4f | |
parent | ae0e4dfd75326c05bfe285c154d2e530a6adc657 (diff) | |
download | podman-3fdb83a2eed3bd1aa21d1896f6e981476e64e97c.tar.gz podman-3fdb83a2eed3bd1aa21d1896f6e981476e64e97c.tar.bz2 podman-3fdb83a2eed3bd1aa21d1896f6e981476e64e97c.zip |
stats: log errors instead of sending 500
As 200 is already out the door, we cannot send 500s anymore.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
-rw-r--r-- | pkg/api/handlers/compat/containers_stats.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/api/handlers/compat/containers_stats.go b/pkg/api/handlers/compat/containers_stats.go index d3f9b7c41..16bd0518a 100644 --- a/pkg/api/handlers/compat/containers_stats.go +++ b/pkg/api/handlers/compat/containers_stats.go @@ -95,28 +95,28 @@ streamLabel: // A label to flatten the scope // Container stats stats, err := ctnr.GetContainerStats(stats) if err != nil { - utils.InternalServerError(w, err) + logrus.Errorf("Unable to get container stats: %v", err) return } inspect, err := ctnr.Inspect(false) if err != nil { - utils.InternalServerError(w, err) + logrus.Errorf("Unable to inspect container: %v", err) return } // Cgroup stats cgroupPath, err := ctnr.CGroupPath() if err != nil { - utils.InternalServerError(w, err) + logrus.Errorf("Unable to get cgroup path of container: %v", err) return } cgroup, err := cgroups.Load(cgroupPath) if err != nil { - utils.InternalServerError(w, err) + logrus.Errorf("Unable to load cgroup: %v", err) return } cgroupStat, err := cgroup.Stat() if err != nil { - utils.InternalServerError(w, err) + logrus.Errorf("Unable to get cgroup stats: %v", err) return } @@ -192,7 +192,7 @@ streamLabel: // A label to flatten the scope } if err := coder.Encode(s); err != nil { - utils.InternalServerError(w, err) + logrus.Errorf("Unable to encode stats: %v", err) return } if flusher, ok := w.(http.Flusher); ok { |