feat: handle template errors

Fixes ZDEV-20
This commit is contained in:
Dragory 2024-01-27 16:01:48 +02:00
parent 2ce5082018
commit ffa9eeb3f5
No known key found for this signature in database
14 changed files with 231 additions and 94 deletions

View file

@ -11,6 +11,7 @@ export enum ERRORS {
MUTE_ROLE_ABOVE_ZEP,
USER_ABOVE_ZEP,
USER_NOT_MODERATABLE,
TEMPLATE_PARSE_ERROR,
}
export const RECOVERABLE_PLUGIN_ERROR_MESSAGES = {
@ -24,6 +25,7 @@ export const RECOVERABLE_PLUGIN_ERROR_MESSAGES = {
[ERRORS.MUTE_ROLE_ABOVE_ZEP]: "Specified mute role is above Zeppelin in the role hierarchy",
[ERRORS.USER_ABOVE_ZEP]: "Cannot mute user, specified user is above Zeppelin in the role hierarchy",
[ERRORS.USER_NOT_MODERATABLE]: "Cannot mute user, specified user is not moderatable",
[ERRORS.TEMPLATE_PARSE_ERROR]: "Template parse error",
};
export class RecoverablePluginError extends Error {