From d66932038593dc354b367a9f972517137cf05357 Mon Sep 17 00:00:00 2001 From: Sheen Capadngan Date: Fri, 4 Oct 2024 22:06:32 +0800 Subject: [PATCH] misc: addressed type issue with knex --- backend/src/ee/services/audit-log/audit-log-dal.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/ee/services/audit-log/audit-log-dal.ts b/backend/src/ee/services/audit-log/audit-log-dal.ts index ad509a743..a12429e01 100644 --- a/backend/src/ee/services/audit-log/audit-log-dal.ts +++ b/backend/src/ee/services/audit-log/audit-log-dal.ts @@ -1,4 +1,4 @@ -import { Knex, KnexTimeoutError } from "knex"; +import { Knex, knex } from "knex"; import { TDbClient } from "@app/db"; import { TableName } from "@app/db/schemas"; @@ -110,7 +110,7 @@ export const auditLogDALFactory = (db: TDbClient) => { return docs; } catch (error) { - if (error instanceof KnexTimeoutError) { + if (error instanceof knex.KnexTimeoutError) { throw new BadRequestError({ error, message: "Failed to fetch audit logs due to timeout. Add more search filters."