Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Commit 4ab7bb7

Browse files
committed
refactor(db/connection): additional info for auth_gssapi_client error
1 parent 68028f1 commit 4ab7bb7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/database/connection.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,14 @@ export async function createConnectionPool() {
4444
} catch (err: any) {
4545
isServerConnected = false;
4646

47+
const message = err.message.includes('auth_gssapi_client')
48+
? `Server requests authentication using unknown plugin auth_gssapi_client.\nSee https://github.com/overextended/oxmysql/issues/213.`
49+
: err.message;
50+
4751
console.log(
48-
`^3Unable to establish a connection to the database (${err.code})!\n^1Error ${err.errno}: ${err.message}^0`
52+
`^3Unable to establish a connection to the database (${err.code})!\n^1Error${
53+
err.errno ? ` ${err.errno}` : ''
54+
}: ${message}^0`
4955
);
5056
}
5157
}

0 commit comments

Comments
 (0)