fix: handle error in getRoomByID

This commit is contained in:
Grail Finder (aider)
2025-05-03 12:16:49 +03:00
parent 444f10ea7e
commit 8d85d0612c

View File

@ -36,7 +36,9 @@ func HandleShowColor(w http.ResponseWriter, r *http.Request) {
// get room by room-id
room, err := getRoomByID(session.CurrentRoom)
if err != nil {
// handle err; ai!
log.Error("failed to get room", "error", err)
abortWithError(w, "failed to get room")
return
}
color, exists := roundWords[word]
log.Debug("got show-color request", "word", word, "color", color)