feat: the worker inform of the error to the api

This commit is contained in:
Zoe Roux
2022-03-01 14:59:36 +01:00
parent e60c89d419
commit 43965a155a
+4 -1
View File
@@ -49,7 +49,10 @@ export class Manager {
handlePipelineError(pipeline: Pipeline, error: Error): Observable<never> {
console.error(`Unhandled exception while trying to listen for the pipeline ${pipeline.name} (type: ${pipeline.type.toString()}).`, error)
fetch(`${process.env["API_URL"]}/error/${pipeline.id}?API_KEY=${process.env["API_KEY"]}`);
fetch(`${process.env["API_URL"]}/error/${pipeline.id}?API_KEY=${process.env["API_KEY"]}`, {
method: "POST",
body: JSON.stringify({error}),
});
return NEVER;
}
}