Skip to content

Commit af7e229

Browse files
committed
Fix error handling in mailer and wiki services
- Updated error message in `incoming.go` to remove unnecessary wrapping of the error. - Corrected typo in error message in `wiki.go` for clarity.
1 parent 1816c7f commit af7e229

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

services/mailer/incoming/incoming.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ loop:
221221
err := func() error {
222222
r := msg.GetBody(section)
223223
if r == nil {
224-
return fmt.Errorf("could not get body from message: %w", err)
224+
return fmt.Errorf("could not get body from message")
225225
}
226226

227227
env, err := enmime.ReadEnvelope(r)

services/wiki/wiki.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func updateWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model
135135
if hasDefaultBranch {
136136
if err := gitRepo.ReadTreeToIndex("HEAD"); err != nil {
137137
log.Error("Unable to read HEAD tree to index in: %s %v", basePath, err)
138-
return fmt.Errorf("fnable to read HEAD tree to index in: %s %w", basePath, err)
138+
return fmt.Errorf("unable to read HEAD tree to index in: %s %w", basePath, err)
139139
}
140140
}
141141

0 commit comments

Comments
 (0)