From b7dcdedf41d5b73069bd50c7a83f4b42e2145cc0 Mon Sep 17 00:00:00 2001 From: Deluan Date: Fri, 1 May 2020 23:07:23 -0400 Subject: [PATCH] More error handling --- server/app/serve_index.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/app/serve_index.go b/server/app/serve_index.go index ca5482faf..642843c58 100644 --- a/server/app/serve_index.go +++ b/server/app/serve_index.go @@ -28,7 +28,12 @@ func ServeIndex(ds model.DataStore, fs http.FileSystem) http.HandlerFunc { "loginBackgroundURL": conf.Server.UILoginBackgroundURL, "enableTranscodingConfig": conf.Server.EnableTranscodingConfig, } - j, _ := json.Marshal(appConfig) + j, err := json.Marshal(appConfig) + if err != nil { + log.Error(r, "Error converting config to JSON", "config", appConfig, err) + } else { + log.Trace(r, "Injecting config in index.html", "config", string(j)) + } data := map[string]interface{}{ "AppConfig": string(j),