mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-04 23:18:01 +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 || {});
|
||||
try {
|
||||
const parsedUrl = new URL(parsedMessage);
|
||||
this.emit(parsedUrl);
|
||||
} catch (error) {
|
||||
logger.error(LogOrigin.Tx, `HTTP Integration: ${error}`);
|
||||
}
|
||||
this.emit(parsedMessage);
|
||||
}
|
||||
}
|
||||
|
||||
async emit(path: URL) {
|
||||
await got.get(path, {
|
||||
retry: { limit: 0 },
|
||||
emit(path: string) {
|
||||
got.get(path, { retry: { limit: 0 } }).catch((err) => {
|
||||
logger.error(LogOrigin.Tx, `HTTP Integration: ${err.code}`);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user