improve error logging

This commit is contained in:
Henrique Dias
2016-02-20 08:46:48 +00:00
parent 7ebdadbbab
commit 01e1715bc7
5 changed files with 6 additions and 12 deletions

View File

@@ -34,7 +34,6 @@ func POST(w http.ResponseWriter, r *http.Request, c *config.Config, filename str
case "frontmatter-only":
f, code, err := parseFrontMatterOnlyFile(rawFile, filename)
if err != nil {
w.Write([]byte(err.Error()))
return code, err
}
@@ -48,7 +47,6 @@ func POST(w http.ResponseWriter, r *http.Request, c *config.Config, filename str
case "complete":
f, code, err := parseCompleteFile(r, c, rawFile, filename)
if err != nil {
w.Write([]byte(err.Error()))
return code, err
}
@@ -61,7 +59,6 @@ func POST(w http.ResponseWriter, r *http.Request, c *config.Config, filename str
err := ioutil.WriteFile(filename, file, 0666)
if err != nil {
w.Write([]byte(err.Error()))
return http.StatusInternalServerError, err
}