From 43965a155afaa2d20666a9776a7ec623ef346131 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Tue, 1 Mar 2022 14:59:36 +0100 Subject: [PATCH] feat: the worker inform of the error to the api --- worker/src/actions.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/worker/src/actions.ts b/worker/src/actions.ts index 856be74..6421018 100644 --- a/worker/src/actions.ts +++ b/worker/src/actions.ts @@ -49,7 +49,10 @@ export class Manager { handlePipelineError(pipeline: Pipeline, error: Error): Observable { 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; } }