public HttpResponseMessage StorageHealthCheck() { try { var response = manager.CountFiles(); if (response > 0) { return(Request.CreateResponse(HttpStatusCode.OK, "Healthy Connection with Storage")); } else { return(Request.CreateResponse(HttpStatusCode.NotFound, "Unhealthy Connection with Storager OR No Files Exists in the Storage Yet!")); } } catch (Exception ex) { GlobalVariable.log.Write(LogLevel.Error, ex); return(Request.CreateResponse(HttpStatusCode.BadRequest)); } }