[PUB-1011] Use more specific error codes for LiveObjects errors#1966
[PUB-1011] Use more specific error codes for LiveObjects errors#1966VeskeR merged 1 commit intointegration/liveobjectsfrom
Conversation
WalkthroughThe changes update error codes in various modules of the liveobjects plugin. Specifically, error codes are adjusted in error handling segments across several classes. The updates include changing codes from 40013 to 40003, from 50000 to 92000, and from 40160 to 40024, without modifying the overall control flow or public API declarations. Changes
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (6)
⏰ Context from checks skipped due to timeout of 90000ms (7)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Resolves PUB-1011
8af90e8 to
bf842fa
Compare
Use 40003 for invalid parameter values, and 92000 for errors associated with invalid state message structure or content.
This PR also suggests introducing new client error code: 40024 - missing channel modes, for these lines, which were added in #1956, to notify the user that it is required to provide state channel modes to use LiveObjects. Previously used 40160 for this, but it's not entirely correct, as it's not a permission issue in this case, it's the API requirement to have state channel modes provided for a channel in order to use the LiveObjects feature. Thus a new, more fine-tuned, error code 40024 is suggested. If we decide to keep this new error code I will open a PR for it in https://github.com/ably/ably-common
Resolves PUB-1011
Summary by CodeRabbit