class DiscoveryResponseErrorHandler extends DefaultResponseErrorHandler {
    @Override
    public void handleError(ClientHttpResponse response) throws IOException {<FILL_FUNCTION_BODY>}

    public String getError() {
        String error = DiscoveryResponseErrorContext.getCurrentContext().getError();

        DiscoveryResponseErrorContext.clearCurrentContext();

        return error;
    }
}

        InputStream inputStream = response.getBody();
        String error = IOUtils.toString(inputStream, DiscoveryConstant.ENCODING_UTF_8);

        DiscoveryResponseErrorContext.getCurrentContext().setError(error);
    
<no_super_class>