mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
validateGuildConfig: also catch StrictValidationError
This commit is contained in:
parent
4c7a51f586
commit
cfb588a7c3
1 changed files with 2 additions and 2 deletions
|
@ -39,8 +39,8 @@ export async function validateGuildConfig(config: any): Promise<string | null> {
|
||||||
const mergedOptions = configUtils.mergeConfig(plugin.defaultOptions || {}, pluginOptions);
|
const mergedOptions = configUtils.mergeConfig(plugin.defaultOptions || {}, pluginOptions);
|
||||||
await plugin.configPreprocessor(mergedOptions as PluginOptions<any>);
|
await plugin.configPreprocessor(mergedOptions as PluginOptions<any>);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof ConfigValidationError) {
|
if (err instanceof ConfigValidationError || err instanceof StrictValidationError) {
|
||||||
return `${pluginName}: ${err.toString()}`;
|
return `${pluginName}: ${err.message}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw err;
|
throw err;
|
||||||
|
|
Loading…
Add table
Reference in a new issue