Sage SDK
  • Getting Started
    • Installation
    • Frontend
    • Server
    • Error Handling
  • Channel
    • Create
    • Membership
    • Moderation
  • Post
  • Update
  • Invite
    • Creation
    • Deletion
  • Post
    • Comment
    • Like
  • User
    • Create
    • Membership
    • Post
    • Update
Powered by GitBook
On this page
  1. Getting Started

Error Handling

PreviousServerNextCreate

Last updated 9 months ago

In the event of encountering an error when interaction with the contract Sui wallets tend to send opaque error messages to the user.

Sage contracts have specific error codes defined to help mitigate debugging issues and more specific error information can be found here. Generally speaking, Sage-specific error codes always begin with "37" (e.g. 370, 371, etc).

Note that the same error code (e.g. "370") interacting with one module (e.g. "channel") may not correspond to the same error for another module (e.g. "post:).

Identifying Error Codes

Each wallet is different, and not all of them appear to send details on this to the user. Here are some examples when attempting to create a new Channel with an invalid name:

Sui Wallet

No error codes shown.

Suiet

The error occurs in the "channel" module with error code "370".

Nightly

No error codes shown.