Timeouts: better validations (#438)
* better timeout validations Signed-off-by: GitHub <noreply@github.com> * almeida reviews Signed-off-by: GitHub <noreply@github.com> * better error handling Signed-off-by: GitHub <noreply@github.com> * add missing catch noops Signed-off-by: GitHub <noreply@github.com> --------- Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
047ab872df
commit
8860d4fb22
5 changed files with 49 additions and 9 deletions
|
@ -9,6 +9,8 @@ export enum ERRORS {
|
|||
INVALID_USER,
|
||||
INVALID_MUTE_ROLE_ID,
|
||||
MUTE_ROLE_ABOVE_ZEP,
|
||||
USER_ABOVE_ZEP,
|
||||
USER_NOT_MODERATABLE,
|
||||
}
|
||||
|
||||
export const RECOVERABLE_PLUGIN_ERROR_MESSAGES = {
|
||||
|
@ -20,6 +22,8 @@ export const RECOVERABLE_PLUGIN_ERROR_MESSAGES = {
|
|||
[ERRORS.INVALID_USER]: "Invalid user",
|
||||
[ERRORS.INVALID_MUTE_ROLE_ID]: "Specified mute role is not valid",
|
||||
[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",
|
||||
};
|
||||
|
||||
export class RecoverablePluginError extends Error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue