From 503b7f04ebc3bd7ed7a0aead8c205f3f01b6f81f Mon Sep 17 00:00:00 2001 From: Fang-Pen Lin Date: Fri, 24 Oct 2025 09:24:07 -0700 Subject: [PATCH] Try a different way of import to see if we can fix CI --- .../services/pam-resource/shared/sql/sql-resource-factory.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/ee/services/pam-resource/shared/sql/sql-resource-factory.ts b/backend/src/ee/services/pam-resource/shared/sql/sql-resource-factory.ts index e26ae6b21..a171b39b5 100644 --- a/backend/src/ee/services/pam-resource/shared/sql/sql-resource-factory.ts +++ b/backend/src/ee/services/pam-resource/shared/sql/sql-resource-factory.ts @@ -1,6 +1,6 @@ import knex from "knex"; import mysql, { Connection } from "mysql2/promise"; -import { DatabaseError } from "pg"; +import * as pg from "pg"; import tls, { PeerCertificate } from "tls"; import { verifyHostInputValidity } from "@app/ee/services/dynamic-secret/dynamic-secret-fns"; @@ -94,7 +94,7 @@ const makeSqlConnection = ( try { await client.raw(SIMPLE_QUERY); } catch (error) { - if (error instanceof DatabaseError) { + if (error instanceof pg.DatabaseError) { // Hacky way to know if we successfully hit the database. // TODO: potentially two approaches to solve the problem. // 1. change the work flow, add account first then resource