From 831d7fb0d7ee007fc04b1b0ff24b77c7d5635f5e Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 28 Oct 2020 13:16:42 -0400 Subject: Stop excessive wrapping of errors Most of the builtin golang functions like os.Stat and os.Open report errors including the file system object path. We should not wrap these errors and put the file path in a second time, causing stuttering of errors when they get presented to the user. This patch tries to cleanup a bunch of these errors. Signed-off-by: Daniel J Walsh --- libpod/healthcheck.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod/healthcheck.go') diff --git a/libpod/healthcheck.go b/libpod/healthcheck.go index bd55b852e..f77075893 100644 --- a/libpod/healthcheck.go +++ b/libpod/healthcheck.go @@ -223,7 +223,7 @@ func (c *Container) GetHealthCheckLog() (define.HealthCheckResults, error) { } b, err := ioutil.ReadFile(c.healthCheckLogPath()) if err != nil { - return healthCheck, errors.Wrapf(err, "failed to read health check log file %s", c.healthCheckLogPath()) + return healthCheck, errors.Wrap(err, "failed to read health check log file") } if err := json.Unmarshal(b, &healthCheck); err != nil { return healthCheck, errors.Wrapf(err, "failed to unmarshal existing healthcheck results in %s", c.healthCheckLogPath()) -- cgit v1.2.3-54-g00ecf