mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 13:00:10 +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
@@ -4,6 +4,7 @@
|
||||
package vagrant
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
@@ -230,7 +231,7 @@ func DownloadPackageFile(ctx *context.Context) {
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
if err == packages_model.ErrPackageNotExist || err == packages_model.ErrPackageFileNotExist {
|
||||
if errors.Is(err, packages_model.ErrPackageNotExist) || errors.Is(err, packages_model.ErrPackageFileNotExist) {
|
||||
apiError(ctx, http.StatusNotFound, err)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user