mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 13:23:35 +00:00
fix: uncaught error in http integration (#837)
This commit is contained in:
committed by
GitHub
parent
fe30752130
commit
c2280da61f
@@ -45,18 +45,13 @@ export class HttpIntegration implements IIntegration<HttpSubscription> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const parsedMessage = parseTemplateNested(message, state || {});
|
const parsedMessage = parseTemplateNested(message, state || {});
|
||||||
try {
|
this.emit(parsedMessage);
|
||||||
const parsedUrl = new URL(parsedMessage);
|
|
||||||
this.emit(parsedUrl);
|
|
||||||
} catch (error) {
|
|
||||||
logger.error(LogOrigin.Tx, `HTTP Integration: ${error}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async emit(path: URL) {
|
emit(path: string) {
|
||||||
await got.get(path, {
|
got.get(path, { retry: { limit: 0 } }).catch((err) => {
|
||||||
retry: { limit: 0 },
|
logger.error(LogOrigin.Tx, `HTTP Integration: ${err.code}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user