mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-08 09:44:00 +09:00
Refactor package (routes and error handling, npm peer dependency) (#33111)
This commit is contained in:
@ -62,7 +62,7 @@ func UploadPackageFile(ctx *context.Context) {
|
||||
|
||||
pck, err := arch_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)
|
||||
|
Reference in New Issue
Block a user