diff --git a/cmd/web/setuphandler.go b/cmd/web/setuphandler.go index 7366619..3b6442b 100644 --- a/cmd/web/setuphandler.go +++ b/cmd/web/setuphandler.go @@ -23,7 +23,10 @@ func setupHandler(w http.ResponseWriter, r *http.Request) { return } - GenerateJWTAndStoreInCookie(w, appKey) + if err := GenerateJWTAndStoreInCookie(w, appKey); err != nil { + http.Error(w, "Failed to create session", http.StatusInternalServerError) + return + } } comp := templates.Setup(session)