3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Fix YAML errors not showing the proper error message in config editor

This commit is contained in:
Dragory 2019-07-22 02:00:04 +03:00
parent 004a753a58
commit 828385d0eb

View file

@ -47,7 +47,7 @@ export function initGuildsAPI(app: express.Express) {
parsedConfig = yaml.safeLoad(config);
} catch (e) {
if (e instanceof YAMLException) {
return error(res, e.message, 400);
return res.status(400).json({ errors: [e.message] });
}
console.error("Error when loading YAML: " + e.message);