mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-05 18:03:10 +03:00
More error handling
This commit is contained in:
parent
bf8f9d2be8
commit
b7dcdedf41
@ -28,7 +28,12 @@ func ServeIndex(ds model.DataStore, fs http.FileSystem) http.HandlerFunc {
|
|||||||
"loginBackgroundURL": conf.Server.UILoginBackgroundURL,
|
"loginBackgroundURL": conf.Server.UILoginBackgroundURL,
|
||||||
"enableTranscodingConfig": conf.Server.EnableTranscodingConfig,
|
"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{}{
|
data := map[string]interface{}{
|
||||||
"AppConfig": string(j),
|
"AppConfig": string(j),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user