diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-04-12 23:01:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 11:01:41 -0400 |
commit | 53e324fd80fe08dc78f58fa4e0d98e02974cd18f (patch) | |
tree | cca92092b142b242f0173aff96ccbef972c83d1f /services | |
parent | 3753ecd58348a8b693a1c707b471d0fb0c7566f2 (diff) | |
download | gitea-53e324fd80fe08dc78f58fa4e0d98e02974cd18f.tar.gz gitea-53e324fd80fe08dc78f58fa4e0d98e02974cd18f.zip |
Improve LFS error logs (#24072)
The error logs were not clear.
Help (but not fix) #24053
Diffstat (limited to 'services')
-rw-r--r-- | services/lfs/server.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/lfs/server.go b/services/lfs/server.go index 6c4832c584..44de9ba74f 100644 --- a/services/lfs/server.go +++ b/services/lfs/server.go @@ -126,7 +126,6 @@ func DownloadHandler(ctx *context.Context) { _, err = content.Seek(fromByte, io.SeekStart) if err != nil { log.Error("Whilst trying to read LFS OID[%s]: Unable to seek to %d Error: %v", meta.Oid, fromByte, err) - writeStatus(ctx, http.StatusInternalServerError) return } @@ -334,10 +333,11 @@ func UploadHandler(ctx *context.Context) { log.Error("Upload does not match LFS MetaObject [%s]. Error: %v", p.Oid, err) writeStatusMessage(ctx, http.StatusUnprocessableEntity, err.Error()) } else { + log.Error("Error whilst uploadOrVerify LFS OID[%s]: %v", p.Oid, err) writeStatus(ctx, http.StatusInternalServerError) } if _, err = git_model.RemoveLFSMetaObjectByOid(ctx, repository.ID, p.Oid); err != nil { - log.Error("Error whilst removing metaobject for LFS OID[%s]: %v", p.Oid, err) + log.Error("Error whilst removing MetaObject for LFS OID[%s]: %v", p.Oid, err) } return } @@ -365,6 +365,7 @@ func VerifyHandler(ctx *context.Context) { status := http.StatusOK if err != nil { + log.Error("Error whilst verifying LFS OID[%s]: %v", p.Oid, err) status = http.StatusInternalServerError } else if !ok { status = http.StatusNotFound |