mirror of
https://github.com/go-gitea/gitea.git
synced 2025-12-14 21:15:18 +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):
|
||||
ctx.APIError(http.StatusBadRequest, err.Error())
|
||||
return nil, nil
|
||||
case errors.Is(err, util.ErrNotExist):
|
||||
ctx.APIErrorNotFound()
|
||||
return nil, nil
|
||||
case err != nil:
|
||||
ctx.APIErrorInternal(err)
|
||||
return nil, nil
|
||||
case user_model.IsErrUserNotExist(err) || repo_model.IsErrRepoNotExist(err):
|
||||
ctx.APIErrorNotFound()
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
isSameRepo := baseRepo.ID == headRepo.ID
|
||||
|
||||
Loading…
Reference in New Issue
Block a user