Fix http code on error in Browser

This commit is contained in:
Jan-Lukas Else 2021-03-09 21:48:30 +01:00
parent 1218def2b6
commit 13f770dd7f
1 changed files with 1 additions and 1 deletions

View File

@ -24,11 +24,11 @@ func serveError(w http.ResponseWriter, r *http.Request, message string, status i
if message == "" { if message == "" {
message = http.StatusText(status) message = http.StatusText(status)
} }
w.WriteHeader(status)
render(w, r, templateError, &renderData{ render(w, r, templateError, &renderData{
Data: &errorData{ Data: &errorData{
Title: title, Title: title,
Message: message, Message: message,
}, },
}) })
w.WriteHeader(status)
} }