From fd45b2c572b876300d4e5094b74b8ab13888ee88 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Sun, 18 Mar 2018 09:24:14 -0400 Subject: [PATCH] Return 404 for stats on nonexistent houses --- construction.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/construction.go b/construction.go index e36badb..7901d10 100644 --- a/construction.go +++ b/construction.go @@ -284,8 +284,9 @@ func viewHouseStats(app *app, w http.ResponseWriter, r *http.Request) error { if err != nil { page = []byte("HTMLlot.") } + w.WriteHeader(http.StatusNotFound) fmt.Fprintf(w, "%s", page) - return nil + return err } } return err