Started adding timezone support

This commit is contained in:
Andris Reinman 2016-04-29 14:57:13 +03:00
parent 33e075ecdc
commit 478237e60f
14 changed files with 191 additions and 9 deletions

View file

@ -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);