Skip to content

Commit 6d9dbd9

Browse files
committed
fix: Removed error handling and logging from ConnectionPool class
1 parent ad2f750 commit 6d9dbd9

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/database/ConnectionPool.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Pool, PoolClient } from 'pg';
22
import Config from '../config';
3-
import { Catch } from '../decorators/Catch';
43
export class ConnectionPool {
54
private _pool: Pool;
65
private _isProduction: 'development' | 'production';
@@ -9,11 +8,6 @@ export class ConnectionPool {
98
this._isProduction = Config.environment;
109
this._pool = this.initializePool(connectionString);
1110
}
12-
@Catch({
13-
message: 'Failed to connect to the database. Please check your credentials or network connection.',
14-
statusCode: 500,
15-
category: 'ConnectionPool',
16-
})
1711
async connect(): Promise<void> {
1812
try {
1913
const client = await this._pool.connect();
@@ -30,11 +24,6 @@ export class ConnectionPool {
3024
}
3125
}
3226
}
33-
@Catch({
34-
message: 'Failed to create the database. Please check the connection or permissions.',
35-
statusCode: 500,
36-
category: 'ConnectionPool',
37-
})
3827
private async createDatabase(): Promise<void> {
3928
const { user, host, password, port, databaseName } = Config.database;
4029
const client = new Pool({

0 commit comments

Comments
 (0)