diff --git a/handlers/elements.go b/handlers/elements.go index 0ae3905..cc0b60b 100644 --- a/handlers/elements.go +++ b/handlers/elements.go @@ -32,11 +32,13 @@ func HandleShowColor(w http.ResponseWriter, r *http.Request) { session, ok := ctx.Value(models.CtxSessionKey).(models.Session) if !ok { // trying to get color without a session -> error + abortWithError(w, "session not found") + return } // get room by room-id room, err := getRoomByID(session.CurrentRoom) if err != nil { - log.Error("failed to get room", "error", err) + log.Error("failed to get room", "error", err, "session", session) abortWithError(w, "failed to get room") return }