spring-security
spring-security copied to clipboard
throw original exception to keep compatibility with common RestTemplate
Currently, the doExecute method in spring−security−kerberos−client always wraps exceptions in a RestClientException. This unnecessarily complicates exception handling for HTTP status errors and other exceptions.
This change modifies the behavior to avoid wrapping an exception if it is already an instance of RestClientException.
This aligns the exception handling with other RestTemplate implementations, making it more consistent and easier to manage.