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:
@@ -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
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user