mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-12-02 20:48:15 +08:00
Backport #36041 by @hamkido - Updated error message in `incoming.go` to remove unnecessary wrapping of the error. - Corrected typo in error message in `wiki.go` for clarity. Co-authored-by: hamkido <hamki.do2000@gmail.com>
This commit is contained in:
@@ -6,6 +6,7 @@ package incoming
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
net_mail "net/mail"
|
net_mail "net/mail"
|
||||||
"regexp"
|
"regexp"
|
||||||
@@ -221,7 +222,7 @@ loop:
|
|||||||
err := func() error {
|
err := func() error {
|
||||||
r := msg.GetBody(section)
|
r := msg.GetBody(section)
|
||||||
if r == nil {
|
if r == nil {
|
||||||
return fmt.Errorf("could not get body from message: %w", err)
|
return errors.New("could not get body from message")
|
||||||
}
|
}
|
||||||
|
|
||||||
env, err := enmime.ReadEnvelope(r)
|
env, err := enmime.ReadEnvelope(r)
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ func updateWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model
|
|||||||
if hasDefaultBranch {
|
if hasDefaultBranch {
|
||||||
if err := gitRepo.ReadTreeToIndex("HEAD"); err != nil {
|
if err := gitRepo.ReadTreeToIndex("HEAD"); err != nil {
|
||||||
log.Error("Unable to read HEAD tree to index in: %s %v", basePath, err)
|
log.Error("Unable to read HEAD tree to index in: %s %v", basePath, err)
|
||||||
return fmt.Errorf("fnable to read HEAD tree to index in: %s %w", basePath, err)
|
return fmt.Errorf("unable to read HEAD tree to index in: %s %w", basePath, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user