Code example for DefaultResponseErrorHandler

Methods: handleError

0
        } 
    } 
 
    private void handleUncategorizedError(ClientHttpResponse response, Map<String, Object> errorDetails) {
        try { 
            super.handleError(response);
        } catch (Exception e) {
            if (errorDetails != null) {
                throw new UncategorizedApiException(generateMessage(errorDetails), e);
            } else { 
                throw new UncategorizedApiException("No error details from Salesforce.", e);
            } 
        } 
    } 
 
    @SuppressWarnings("unchecked") 
    private Map<String, Object> extractErrorDetailsFromResponse(ClientHttpResponse response) throws IOException {
        ObjectMapper mapper = new ObjectMapper(new JsonFactory());
        try { 
            CollectionType listType = TypeFactory.defaultInstance().constructCollectionType(List.class, Map.class);