Fix maven panic when no package exists (#33888) (#33889)

Backport #33888 by @wxiaoguang

Fix #33886

Restore the old logic from #16510, which was incorrectly removed by
#33678

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
pull/33902/head
Giteabot 4 days ago committed by GitHub
parent be94f7bc07
commit 5fadcf997e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -98,6 +98,11 @@ func serveMavenMetadata(ctx *context.Context, params parameters) {
}
pvs = append(pvsLegacy, pvs...)
if len(pvs) == 0 {
apiError(ctx, http.StatusNotFound, packages_model.ErrPackageNotExist)
return
}
pds, err := packages_model.GetPackageDescriptors(ctx, pvs)
if err != nil {
apiError(ctx, http.StatusInternalServerError, err)

Loading…
Cancel
Save