Started adding timezone support
This commit is contained in:
parent
33e075ecdc
commit
478237e60f
14 changed files with 191 additions and 9 deletions
|
@ -21,10 +21,10 @@ let db = mysql.createPool(mysqlConfig);
|
|||
function listTables(callback) {
|
||||
db.getConnection((err, connection) => {
|
||||
if (err) {
|
||||
if(err.code === 'ER_ACCESS_DENIED_ERROR'){
|
||||
if (err.code === 'ER_ACCESS_DENIED_ERROR') {
|
||||
err = new Error('Could not access the database. Check MySQL config and authentication credentials');
|
||||
}
|
||||
if(err.code === 'ECONNREFUSED' || err.code === 'PROTOCOL_SEQUENCE_TIMEOUT'){
|
||||
if (err.code === 'ECONNREFUSED' || err.code === 'PROTOCOL_SEQUENCE_TIMEOUT') {
|
||||
err = new Error('Could not connect to the database. Check MySQL host and port configuration');
|
||||
}
|
||||
return callback(err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue