Merge pull request #3948 from flavianmissi/log-healthcheck-error

registry/handlers/app: log healthcheck error before return
This commit is contained in:
Hayley Swimelar 2023-06-27 14:06:31 -07:00 committed by GitHub
commit 71a6c56fbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
})
}