refactor(db/connection): additional info for auth_gssapi_client error

This commit is contained in:
Linden committed 2024-05-09 11:43:32 +10:00
1 parent 68028f1f4e
commit 4ab7bb7a10
1 file changed
+7 -1
+7 -1
View File
@@ -44,8 +44,14 @@ export async function createConnectionPool() {
} catch (err: any) {
isServerConnected = false;
const message = err.message.includes('auth_gssapi_client')
? `Server requests authentication using unknown plugin auth_gssapi_client.\nSee https://github.com/overextended/oxmysql/issues/213.`
: err.message;
console.log(
`^3Unable to establish a connection to the database (${err.code})!\n^1Error ${err.errno}: ${err.message}^0`
`^3Unable to establish a connection to the database (${err.code})!\n^1Error${
err.errno ? ` ${err.errno}` : ''
}: ${message}^0`
);
}
}