From 87081252bad11fad7c9232f1d3dd39dfe383b35f Mon Sep 17 00:00:00 2001 From: Flavian Missi Date: Tue, 20 Jun 2023 11:03:12 +0200 Subject: [PATCH] registry/handlers/app: log healthcheck error before return Signed-off-by: Flavian Missi --- registry/handlers/app.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/registry/handlers/app.go b/registry/handlers/app.go index 95c677f0..cdcb326f 100644 --- a/registry/handlers/app.go +++ b/registry/handlers/app.go @@ -377,6 +377,9 @@ func (app *App) RegisterHealthChecks(healthRegistries ...*health.Registry) { if _, ok := err.(storagedriver.PathNotFoundError); ok { err = nil // pass this through, backend is responding, but this path doesn't exist. } + if err != nil { + dcontext.GetLogger(app).Errorf("storage driver health check: %v", err) + } return err } @@ -745,7 +748,6 @@ func (app *App) dispatcher(dispatch dispatchFunc) http.Handler { } dispatch(context, r).ServeHTTP(w, r) - }) }