misc: addressed type issue with knex

This commit is contained in:
Sheen Capadngan
2024-10-04 22:06:32 +08:00
parent 8dbdb79833
commit d669320385

View File

@@ -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."