feat: handle template errors
Fixes ZDEV-20
This commit is contained in:
parent
2ce5082018
commit
ffa9eeb3f5
14 changed files with 231 additions and 94 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue