Skip to content

Commit

Permalink
Write out template error to display in preview
Browse files Browse the repository at this point in the history
  • Loading branch information
bittersweet committed May 23, 2016
1 parent 4847bd2 commit dfd038f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ func handlePreview() http.Handler {
res, err := renderTemplate(pD.Template, &eD)
if err != nil {
log.Println("renderTemplate error", err)
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
w.Write([]byte(err.Error()))
return
}

Expand Down

0 comments on commit dfd038f

Please sign in to comment.