-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed
Labels
status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement
Description
Custom error handler set using RestTemplateBuilder
bean or using the configuration TestRestTemplateConfiguration
from Spring Boot Reference Guide is overriden by TestRestTemplate.NoOpResponseErrorHandler
.
Specifically, when using the following class:
class CustomResponseErrorHandler extends DefaultResponseErrorHandler {
// implementation
}
in the configuration of the builder:
ResponseErrorHandler customErrorHandler = new CustomResponseErrorHandler();
RestTemplateBuilder builder = builderProvider.getIfAvailable()
.errorHandler(customErrorHandler);
The following line is false:
new TestRestTemplate(builder.build()).getRestTemplate().getErrorHandler().equals(customErrorHandler)
Metadata
Metadata
Assignees
Labels
status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement