in healthcheck.go [15:28]
func (h HealthcheckHandler) ServeHTTP(w http.ResponseWriter, request *http.Request) {
_, err := h.redisClient.Ping(context.TODO()).Result()
if err == nil {
w.WriteHeader(200)
} else {
log.Printf("HEALTHCHECK FAILED: %s connecting to Redis", err)
response := helpers.GenericErrorResponse{
Status: "error",
Detail: "could not contact redis db",
}
helpers.WriteJsonContent(response, w, 500)
}
}