spring-framework / org.springframework.web.client / ExtractingResponseErrorHandler / setSeriesMapping

setSeriesMapping

open fun setSeriesMapping(seriesMapping: MutableMap<Series, Class<out RestClientException>>): Unit

Set the mapping from HTTP status series to RestClientException subclass. If this mapping has a match for the status code of a given ClientHttpResponse, #hasError(ClientHttpResponse) will return true and #handleError(ClientHttpResponse) will attempt to use the configured message converters to convert the response into the mapped subclass of RestClientException.