mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-05 02:34:14 +02:00
Merge pull request #182 from matrix-org/rav/speculator_text_errors
Make the speculator serve up errors as plain text
This commit is contained in:
commit
1e27b104dd
|
|
@ -135,6 +135,7 @@ func generate(dir string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func writeError(w http.ResponseWriter, code int, err error) {
|
func writeError(w http.ResponseWriter, code int, err error) {
|
||||||
|
w.Header().Set("Content-Type", "text/plain")
|
||||||
w.WriteHeader(code)
|
w.WriteHeader(code)
|
||||||
io.WriteString(w, fmt.Sprintf("%v\n", err))
|
io.WriteString(w, fmt.Sprintf("%v\n", err))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue