catch error when a field's external api is not available and interrupts prefilling process
This commit is contained in:
parent
8fbc20c823
commit
1c0562d7e7
|
@ -203,7 +203,13 @@ public class PrefillingMapper {
|
|||
AutoCompleteData autoCompleteData = mapper.treeToValue(dataNode, AutoCompleteData.class);
|
||||
isMultiSelect = autoCompleteData.getMultiAutoComplete();
|
||||
for (String format : parsedValues) {
|
||||
List<ExternalAutocompleteFieldModel> result = DatasetProfileManager.getAutocomplete(autoCompleteData, format);
|
||||
List<ExternalAutocompleteFieldModel> result = new ArrayList<>();
|
||||
try {
|
||||
result = DatasetProfileManager.getAutocomplete(autoCompleteData, format);
|
||||
}
|
||||
catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
result = result.stream().filter(StreamDistinctBy.distinctByKey(ExternalAutocompleteFieldModel::getId)).collect(Collectors.toList());
|
||||
if(!result.isEmpty()){
|
||||
List<String> tempValues = new LinkedList<>();
|
||||
|
|
Loading…
Reference in New Issue