Given a PyPI group repository (pypi) with two proxy repositories (e.g. pypi-local-proxy and pypi-central), that have a component with the same name (e.g. django-braces), but different versions (e.g. 1.4.0 in the pypi-local-proxy and 1.14.0 in the pypi-central), an attempt to download a version from the group that doesn't exist in the proxy repository with the higher priority fails with:
The attached scripts reproduce this issue using the sonatype/nexus3:3.22.0 docker container. The issue isn't present in the previous Nexus versions.
To reproduce, put the setup.sh and test.sh scripts into a dedicated folder and make sure you don't have a docker container named nexus. Run the setup.sh script to launch a container with Nexus bound to the 8081 port and the repositories configured as in the description above. The test.sh will upload a test artifact to the proxied repository and try to download a different version through the group, which should result in a 500 error.
It might be related to https://issues.sonatype.org/browse/NEXUS-23398