Fix: Improve error message

Co-authored-by: Frank Elsinga <frank@elsinga.de>
pull/3017/head
Nelson Chan 2 years ago committed by GitHub
parent 38fab198bb
commit f70b971810
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -190,7 +190,7 @@ class Database {
}; };
} else if (dbConfig.type === "mariadb") { } else if (dbConfig.type === "mariadb") {
if (!/^\w+$/.test(dbConfig.dbName)) { if (!/^\w+$/.test(dbConfig.dbName)) {
throw Error("Invalid Database name"); throw Error("Invalid database name. A database name can only consist of letters, numbers and underscores");
} }
const connection = await mysql.createConnection({ const connection = await mysql.createConnection({

Loading…
Cancel
Save