1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-05 00:58:19 +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

@@ -20,7 +20,7 @@ type SessionStore session.Store
// Method represents an authentication method (plugin) for HTTP requests.
type Method interface {
// Verify tries to verify the authentication data contained in the request.
// If verification is successful returns either an existing user object (with id > 0)
// If verification succeeds, it returns either an existing user object (with id > 0)
// or a new user object (with id = 0) populated with the information that was found
// in the authentication data (username or email).
// Second argument returns err if verification fails, otherwise

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 {