From 3bf0baba8ac78d79fef7e054922524f604d845f9 Mon Sep 17 00:00:00 2001 From: Lomanic Date: Tue, 15 Dec 2020 21:15:09 +0200 Subject: [PATCH] Add error message in HTTP response when spaceapi fails to request backend API --- main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main.go b/main.go index a4f9fc2..c938097 100644 --- a/main.go +++ b/main.go @@ -90,6 +90,7 @@ func rootHandler(w http.ResponseWriter, r *http.Request) { resp, err := http.Get(config.PRESENCEAPI) if err != nil { w.WriteHeader(http.StatusServiceUnavailable) + fmt.Fprintf(w, "err: unable to request presence API: %v", err) return } defer resp.Body.Close()