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 20, 2024
1 parent 533c4d0 commit d4da7da
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/core/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit d4da7da

Please sign in to comment.