diff --git a/scripts/fetch-asyncapi-example.js b/scripts/fetch-asyncapi-example.js index 840b1bbec92..0f60108ff5e 100644 --- a/scripts/fetch-asyncapi-example.js +++ b/scripts/fetch-asyncapi-example.js @@ -81,12 +81,11 @@ const buildCLIListFromExamples = async () => { value: example }; } catch (error) { - // Failed for somereason to parse this spec file, ignore for now console.error(error); } }); - const exampleList = await Promise.all(buildExampleList); + const exampleList = (await Promise.all(buildExampleList)).filter(item => !!item); const orderedExampleList = exampleList.sort((a, b) => a.name.localeCompare(b.name)); fs.writeFileSync(path.join(EXAMPLE_DIRECTORY, 'examples.json'), JSON.stringify(orderedExampleList, null, 4));