diff --git a/tools/api.go b/tools/api.go index e213ecd..08cb9ef 100644 --- a/tools/api.go +++ b/tools/api.go @@ -5,6 +5,7 @@ import ( "errors" "strings" + oclib "cloud.o-forge.io/core/oc-lib" "cloud.o-forge.io/core/oc-lib/config" "cloud.o-forge.io/core/oc-lib/dbs/mongo" beego "github.com/beego/beego/v2/server/web" @@ -145,6 +146,8 @@ func (a *API) CheckRemoteAPIs(apis []DataType) (State, map[string]string, error) var resp APIStatusResponse b, err := caller.CallGet("http://"+api.API()+":8080", "/oc/version/status") // Call the status endpoint of the remote API (standard OC status endpoint) if err != nil { + l := oclib.GetLogger() + l.Error().Msg(api.String() + " not reachable") state = REDUCED_SERVICE // If a remote API is not reachable, return reduced service continue }