fix: Do not write 2 errors to api on template fetch error (#2285)

This commit is contained in:
Steven Masley
2022-06-13 15:42:14 +00:00
committed by GitHub
parent cbde8e8b91
commit 49f857806f
+1
View File
@@ -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{