Fixed error page always sending 401 instead of correct error code

This commit is contained in:
2025-02-23 16:06:59 +11:00
parent e794024786
commit 838d6264c9

View File

@@ -18,7 +18,7 @@ func ErrorPage(
continues to happen contact an administrator.`,
503: "The server is currently down for maintenance and should be back soon. =)",
}
w.WriteHeader(http.StatusUnauthorized)
w.WriteHeader(errorCode)
page.Error(errorCode, http.StatusText(errorCode), message[errorCode]).
Render(r.Context(), w)
}