warn and disable publisher routes if missing env vars
1 file changed, 4 insertions(+), 2 deletions(-)
changed files
M domain/web/website.go → domain/web/website.go
@@ -190,7 +190,7 @@ ClientSecret: os.Getenv("OIDC_CLIENT_SECRET"), }, }, log.Named("publisher")) if err != nil { - return nil, fault.Wrap(err, fmsg.With("could not initialise publisher")) + log.Warn("could not initialise publisher", "error", err) } mux := ihttp.NewServeMux(log.Named("http"))@@ -198,7 +198,9 @@ mux.HandleError(website.ErrorHandler) mux.Handle("/", website) mux.HandleFunc("/calendar", website.Calendar) website.identity.RegisterHandlers(mux) - website.publisher.RegisterHandlers(mux) + if website.publisher != nil { + website.publisher.RegisterHandlers(mux) + } if opts.Development { staticHandler := func(w http.ResponseWriter, r *http.Request) ihttp.Error {