Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,17 @@ void renderKibanaFunctionDefinition(
if (info.examples().length > 0) {
builder.startArray("examples");
for (Example example : info.examples()) {
builder.value(loadExample(example.file(), example.tag()));
var loadedExample = loadExample(example.file(), example.tag());
if (loadedExample == null) {
throw new IllegalArgumentException(
"Failed to write Kibana function definition for function ["
+ name
+ "], example with tag ["
+ example.tag()
+ "] cannot be loaded."
);
}
builder.value(loadedExample);
}
builder.endArray();
} else if (info.operator().isEmpty()) {
Expand Down