mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 17:20:53 +02:00
Refactor package (routes and error handling, npm peer dependency) (#33111)
This commit is contained in:
1 parent
ef736b7e27
commit
80e4f4c4eb
28 files changed
+153
-244
No files matched your search
@@ -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