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:
parent
004a753a58
commit
828385d0eb
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue