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);
|
||||
await plugin.configPreprocessor(mergedOptions as PluginOptions<any>);
|
||||
} catch (err) {
|
||||
if (err instanceof ConfigValidationError) {
|
||||
return `${pluginName}: ${err.toString()}`;
|
||||
if (err instanceof ConfigValidationError || err instanceof StrictValidationError) {
|
||||
return `${pluginName}: ${err.message}`;
|
||||
}
|
||||
|
||||
throw err;
|
||||
|
|
Loading…
Add table
Reference in a new issue