Skip to content

Commit 49f8578

Browse files
authored
fix: Do not write 2 errors to api on template fetch error (coder#2285)
1 parent cbde8e8 commit 49f8578

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

coderd/httpmw/templateparam.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ func ExtractTemplateParam(db database.Store) func(http.Handler) http.Handler {
3737
httpapi.Write(rw, http.StatusNotFound, httpapi.Response{
3838
Message: fmt.Sprintf("Template %q does not exist.", templateID),
3939
})
40+
return
4041
}
4142
if err != nil {
4243
httpapi.Write(rw, http.StatusInternalServerError, httpapi.Response{

0 commit comments

Comments
 (0)