1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-25 19:58:36 +00:00

Fix error logs and improve some comments/messages (#35105)

This commit is contained in:
wxiaoguang
2025-07-17 19:09:54 +08:00
committed by GitHub
parent 891a827158
commit de1114b4e8
14 changed files with 19 additions and 41 deletions

View File

@@ -83,6 +83,7 @@ func (b *Base) RespHeader() http.Header {
}
// HTTPError returned an error to web browser
// FIXME: many calls to this HTTPError are not right: it shouldn't expose err.Error() directly, it doesn't accept more than one content
func (b *Base) HTTPError(status int, contents ...string) {
v := http.StatusText(status)
if len(contents) > 0 {