mirror of
https://github.com/go-gitea/gitea.git
synced 2025-12-17 22:45:25 +08:00
Fix bug
This commit is contained in:
parent
7ceeab1200
commit
3de27c261e
@ -1086,12 +1086,12 @@ func parseCompareInfo(ctx *context.APIContext, compareParam string) (result *par
|
|||||||
case errors.Is(err, util.ErrInvalidArgument):
|
case errors.Is(err, util.ErrInvalidArgument):
|
||||||
ctx.APIError(http.StatusBadRequest, err.Error())
|
ctx.APIError(http.StatusBadRequest, err.Error())
|
||||||
return nil, nil
|
return nil, nil
|
||||||
|
case errors.Is(err, util.ErrNotExist):
|
||||||
|
ctx.APIErrorNotFound()
|
||||||
|
return nil, nil
|
||||||
case err != nil:
|
case err != nil:
|
||||||
ctx.APIErrorInternal(err)
|
ctx.APIErrorInternal(err)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
case user_model.IsErrUserNotExist(err) || repo_model.IsErrRepoNotExist(err):
|
|
||||||
ctx.APIErrorNotFound()
|
|
||||||
return nil, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isSameRepo := baseRepo.ID == headRepo.ID
|
isSameRepo := baseRepo.ID == headRepo.ID
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user