We have a convert for decrypting properties if the value matches a certain pattern (e.g. encrypted(.. encrypted value ..)), and it would throw an exception if the pattern matches but decryption failed (like if there is no permission to decrypt that value). The converter is added in ApplicationContextInitializer.initialize() with ApplicationConversionService.addConverter

It works fine when there are no other converter beans. However, if there is another converter bean that can process the same ConvertiblePair without throwing exceptions, it returns that value without throwing the exception thrown from the decryption converter, causing it to hide the decryption error.

https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindConverter.java#L105-L118 it's related to the logic here.

We are throwing IllegalArgumentException but that always got wrapped into ConversionFailedException in https://github.com/spring-projects/spring-framework/blob/main/spring-core/src/main/java/org/springframework/core/convert/support/ConversionUtils.java#L37-L49

so the BindConverter logic always catches the exception, and we don't have a throw a different exception in the decryption converter to let BindConverter just rethrow the exception without going through other converters.