Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/actions-event-types
Browse files Browse the repository at this point in the history
  • Loading branch information
GiteaBot authored Apr 12, 2023
2 parents 64c32c9 + 53e324f commit 62c910b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions services/lfs/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 62c910b

Please sign in to comment.