Merge pull request #4800 from Infisical/fix/instance-of-error-pam

fix: instance-of error in PAM
This commit is contained in:
Maidul Islam
2025-11-03 15:23:31 -05:00
committed by GitHub

View File

@@ -1,6 +1,5 @@
import knex from "knex";
import mysql, { Connection } from "mysql2/promise";
import * as pg from "pg";
import tls, { PeerCertificate } from "tls";
import { verifyHostInputValidity } from "@app/ee/services/dynamic-secret/dynamic-secret-fns";
@@ -97,7 +96,7 @@ const makeSqlConnection = (
try {
await client.raw(SIMPLE_QUERY);
} catch (error) {
if (error instanceof pg.DatabaseError) {
if (error instanceof Error) {
// 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