Skip to content

Commit 53e324f

Browse files
authored
Improve LFS error logs (#24072)
The error logs were not clear. Help (but not fix) #24053
1 parent 3753ecd commit 53e324f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

services/lfs/server.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ func DownloadHandler(ctx *context.Context) {
126126
_, err = content.Seek(fromByte, io.SeekStart)
127127
if err != nil {
128128
log.Error("Whilst trying to read LFS OID[%s]: Unable to seek to %d Error: %v", meta.Oid, fromByte, err)
129-
130129
writeStatus(ctx, http.StatusInternalServerError)
131130
return
132131
}
@@ -334,10 +333,11 @@ func UploadHandler(ctx *context.Context) {
334333
log.Error("Upload does not match LFS MetaObject [%s]. Error: %v", p.Oid, err)
335334
writeStatusMessage(ctx, http.StatusUnprocessableEntity, err.Error())
336335
} else {
336+
log.Error("Error whilst uploadOrVerify LFS OID[%s]: %v", p.Oid, err)
337337
writeStatus(ctx, http.StatusInternalServerError)
338338
}
339339
if _, err = git_model.RemoveLFSMetaObjectByOid(ctx, repository.ID, p.Oid); err != nil {
340-
log.Error("Error whilst removing metaobject for LFS OID[%s]: %v", p.Oid, err)
340+
log.Error("Error whilst removing MetaObject for LFS OID[%s]: %v", p.Oid, err)
341341
}
342342
return
343343
}
@@ -365,6 +365,7 @@ func VerifyHandler(ctx *context.Context) {
365365

366366
status := http.StatusOK
367367
if err != nil {
368+
log.Error("Error whilst verifying LFS OID[%s]: %v", p.Oid, err)
368369
status = http.StatusInternalServerError
369370
} else if !ok {
370371
status = http.StatusNotFound

0 commit comments

Comments
 (0)