From 540a80e9f919eeddedd88f36326b41cd28ee0be7 Mon Sep 17 00:00:00 2001 From: Omar Ajoue Date: Thu, 15 Feb 2024 10:51:59 +0000 Subject: [PATCH] test: Fix broken workflow tag tests (#8641) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ --- .../src/PublicApi/v1/handlers/workflows/workflows.handler.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.handler.ts b/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.handler.ts index 770ecac9ed..7bdc092056 100644 --- a/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.handler.ts +++ b/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.handler.ts @@ -329,7 +329,8 @@ export = { await updateTags(id, newTags); tags = await getWorkflowTags(id); } catch (error) { - if (error instanceof QueryFailedError && error.message.includes('SQLITE_CONSTRAINT')) { + // TODO: add a `ConstraintFailureError` in typeorm to handle when tags are missing here + if (error instanceof QueryFailedError) { return res.status(404).json({ message: 'Some tags not found' }); } else { throw error;