From d4da7da6508512aec0b65a35f2a6807d351f3a6c Mon Sep 17 00:00:00 2001 From: Andy Ford Date: Tue, 12 Nov 2024 12:30:57 +0000 Subject: [PATCH] core/error: add status code for before publish rule rejection For convenience, we add this error code so that it can be easily checked against. [CHA-701] --- src/core/errors.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core/errors.ts b/src/core/errors.ts index 241e441c..1f48ddae 100644 --- a/src/core/errors.ts +++ b/src/core/errors.ts @@ -4,6 +4,16 @@ import * as Ably from 'ably'; * Error codes for the Chat SDK. */ export enum ErrorCodes { + /** + * The message was rejected before publishing by a rule on the chat room. + */ + MessageRejectedByBeforePublishRule = 42211, + + /** + * The message was rejected before publishing by a moderation rule on the chat room. + */ + MessageRejectedByModeration = 42213, + /** * The messages feature failed to attach. */