Make the speculator serve up errors as plain text
... so that they are legible.
This commit is contained in:
parent
e630f6c0c0
commit
2aa4773cc1
1 changed files with 1 additions and 0 deletions
|
@ -135,6 +135,7 @@ func generate(dir string) error {
|
|||
}
|
||||
|
||||
func writeError(w http.ResponseWriter, code int, err error) {
|
||||
w.Header().Set("Content-Type", "text/plain")
|
||||
w.WriteHeader(code)
|
||||
io.WriteString(w, fmt.Sprintf("%v\n", err))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue