mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-27 17:50:53 +01:00
fix 前端报错的问题
This commit is contained in:
@@ -251,6 +251,9 @@ func FetchPythonDepInfo(depName string) (entity.Dependency, error) {
|
||||
return entity.Dependency{}, err
|
||||
}
|
||||
var data PythonDepJsonData
|
||||
if res.Response().StatusCode == 404 {
|
||||
return entity.Dependency{}, errors.New("get depName from [https://pypi.org] error: 404")
|
||||
}
|
||||
if err := res.ToJSON(&data); err != nil {
|
||||
log.Errorf(err.Error())
|
||||
debug.PrintStack()
|
||||
|
||||
Reference in New Issue
Block a user