server for my chess game
Diffstat (limited to 'src/pg.js')
-rw-r--r--src/pg.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pg.js b/src/pg.js
index ccbd150..9044de7 100644
--- a/src/pg.js
+++ b/src/pg.js
@@ -6,8 +6,8 @@ const pool = new Pool({
ssl: { rejectUnauthorized: false },
});
-pool.on("error", (err, client) => {
- console.error("Error:", err);
+pool.on("error", (err) => {
+ console.error("database: err:", err);
});
export async function command(command) {
@@ -17,7 +17,7 @@ export async function command(command) {
const res = await client.query(command);
return res;
} catch (err) {
- console.error(err.stack);
+ console.error("database: err:", err.stack);
} finally {
client.release();
}