1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 10:18:38 +00:00

Refactor package (routes and error handling, npm peer dependency) (#33111)

This commit is contained in:
wxiaoguang
2025-01-06 22:45:20 +08:00
committed by GitHub
parent ef736b7e27
commit 80e4f4c4eb
28 changed files with 153 additions and 244 deletions

View File

@@ -114,7 +114,7 @@ func UploadPackageFile(ctx *context.Context) {
pck, err := alpine_module.ParsePackage(buf)
if err != nil {
if errors.Is(err, util.ErrInvalidArgument) || err == io.EOF {
if errors.Is(err, util.ErrInvalidArgument) || errors.Is(err, io.EOF) {
apiError(ctx, http.StatusBadRequest, err)
} else {
apiError(ctx, http.StatusInternalServerError, err)