diff --git a/cmd/web/handlers.go b/cmd/web/handlers.go index aab34c5..f0fb5b5 100644 --- a/cmd/web/handlers.go +++ b/cmd/web/handlers.go @@ -123,9 +123,12 @@ func (app *application) game(w http.ResponseWriter, r *http.Request, params http td.P = player app.render(w, r, "game.page.tmpl.html", td) - } else { + } else if errors.Is(err, model.NoSuchEntity) { app.clientError(w, http.StatusNotFound) return + } else { + app.serverError(w, err) + return } }