Skip to content

Commit 9291155

Browse files
fix: catch error (#246)
1 parent ac90d41 commit 9291155

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

index.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,19 @@ const execute = () => {
8787
job.provider
8888
.filter((p) => providers.find((loaded) => loaded.metaInformation.id === p.id) != null)
8989
.forEach(async (prov) => {
90-
const matchedProvider = providers.find((loaded) => loaded.metaInformation.id === prov.id);
91-
matchedProvider.init(prov, job.blacklist);
92-
await new FredyPipeline(
93-
matchedProvider.config,
94-
job.notificationAdapter,
95-
prov.id,
96-
job.id,
97-
similarityCache,
98-
).execute();
90+
try {
91+
const matchedProvider = providers.find((loaded) => loaded.metaInformation.id === prov.id);
92+
matchedProvider.init(prov, job.blacklist);
93+
await new FredyPipeline(
94+
matchedProvider.config,
95+
job.notificationAdapter,
96+
prov.id,
97+
job.id,
98+
similarityCache,
99+
).execute();
100+
} catch (error) {
101+
logger.error(error);
102+
}
99103
});
100104
});
101105
} else {

0 commit comments

Comments
 (0)