diff --git a/connector-runtime/connector-runtime-spring/src/main/java/io/camunda/connector/runtime/inbound/importer/ProcessDefinitionSearch.java b/connector-runtime/connector-runtime-spring/src/main/java/io/camunda/connector/runtime/inbound/importer/ProcessDefinitionSearch.java index 8db4338df4..4304059a9f 100644 --- a/connector-runtime/connector-runtime-spring/src/main/java/io/camunda/connector/runtime/inbound/importer/ProcessDefinitionSearch.java +++ b/connector-runtime/connector-runtime-spring/src/main/java/io/camunda/connector/runtime/inbound/importer/ProcessDefinitionSearch.java @@ -71,9 +71,13 @@ public void query(Consumer> resultHandler) { paginationIndex = newPaginationIdx; } - processDefinitions.addAll(processDefinitionResult.getItems()); + var items = processDefinitionResult.getItems(); + if (items != null) { + processDefinitions.addAll(items); + } - } while (processDefinitionResult.getItems().size() > 0); + } while (processDefinitionResult.getItems() != null + && !processDefinitionResult.getItems().isEmpty()); resultHandler.accept(processDefinitions); }