This is a follow-up of #22442
While trying to integrate this work in Spring Boot, I've realized that the exception message does not match the standard exception as we wrap the list of bean names in brackets. Also the bean names are lost because we don't have a way to convey them in a custom exception that also provides an error message.