From 0bddace1f670419c3023eba88d7d1f18b79490cd Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 13 Jun 2022 10:31:20 -0500 Subject: [PATCH] fix: Do not write 2 errors to api on template fetch error --- coderd/httpmw/templateparam.go | 1 + 1 file changed, 1 insertion(+) diff --git a/coderd/httpmw/templateparam.go b/coderd/httpmw/templateparam.go index 05884304b1566..0a7cba43d8a2a 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{