From 49f857806fb9a3087732ed6c202484bf7b23f9de Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 13 Jun 2022 10:42:14 -0500 Subject: [PATCH] fix: Do not write 2 errors to api on template fetch error (#2285) --- coderd/httpmw/templateparam.go | 1 + 1 file changed, 1 insertion(+) diff --git a/coderd/httpmw/templateparam.go b/coderd/httpmw/templateparam.go index 05884304b1..0a7cba43d8 100644 --- a/coderd/httpmw/templateparam.go +++ b/coderd/httpmw/templateparam.go @@ -37,6 +37,7 @@ func ExtractTemplateParam(db database.Store) func(http.Handler) http.Handler { httpapi.Write(rw, http.StatusNotFound, httpapi.Response{ Message: fmt.Sprintf("Template %q does not exist.", templateID), }) + return } if err != nil { httpapi.Write(rw, http.StatusInternalServerError, httpapi.Response{