From bdf1f7c6012b72f1b45359a7f16833b8c2fbd498 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Thu, 3 Oct 2024 18:30:17 +0400 Subject: [PATCH] Update integration-service.ts --- backend/src/services/integration/integration-service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/src/services/integration/integration-service.ts b/backend/src/services/integration/integration-service.ts index db4997322..4f4b26e24 100644 --- a/backend/src/services/integration/integration-service.ts +++ b/backend/src/services/integration/integration-service.ts @@ -189,6 +189,12 @@ export const integrationServiceFactory = ({ const getIntegration = async ({ id, actor, actorAuthMethod, actorId, actorOrgId }: TGetIntegrationDTO) => { const integration = await integrationDAL.findById(id); + if (!integration) { + throw new NotFoundError({ + message: "Integration not found" + }); + } + const { permission } = await permissionService.getProjectPermission( actor, actorId,