chore: database connection error log
This commit is contained in:
parent
0532d67e0b
commit
9c5f630ae7
@ -708,6 +708,7 @@ export class Database extends EventEmitter implements AsyncEmitter {
|
|||||||
console.log('Connection has been established successfully.');
|
console.log('Connection has been established successfully.');
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log(`Unable to connect to the database: ${error.message}`);
|
||||||
if (count >= (retry as number)) {
|
if (count >= (retry as number)) {
|
||||||
throw new Error('Connection failed, please check your database connection credentials and try again.');
|
throw new Error('Connection failed, please check your database connection credentials and try again.');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user