Skip to content

Commit

Permalink
core/error: add status code for before publish rule rejection
Browse files Browse the repository at this point in the history
For convenience, we add this error code so that it can be easily checked
against.

[CHA-701]
  • Loading branch information
AndyTWF committed Nov 12, 2024
1 parent 32e94af commit 9799fda
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ 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.
*
* For example, a message may be rejected because it violates a moderation policy
* that bans profanity.
*/
MessageRejectedByBeforePublishRule = 42201,

/**
* The messages feature failed to attach.
*/
Expand Down

0 comments on commit 9799fda

Please sign in to comment.