Skip to main content

SDKCallback

The SDKCallback function receives data in the following format:
{status: <SUCCESS|WARNING|ERROR>, message: <string>}
The status field indicates the result of the function call. Possible values are:
  • SUCCESS: Indicates successful completion of an operation.
  • WARNING: Indicates potential issues or incomplete actions that require attention.
  • ERROR: Indicates a failure or exception during the operation.
The message field provides additional context about the status.

Examples

Below are examples of the status and message combinations:

Success Messages

  • {status: "SUCCESS", message: "SDK initialized successfully"}
  • {status: "SUCCESS", message: "Event logged successfully"}
  • {status: "SUCCESS", message: "Page properties set successfully"}
  • {status: "SUCCESS", message: "User properties set successfully"}
  • {status: "SUCCESS", message: "User identities set successfully"}

Warning Messages

  • {status: "WARNING", message: "SDK already initialized"}
  • {status: "WARNING", message: "SDK initialization is in progress"}
  • {status: "WARNING", message: "SDK not initialized"}
  • {status: "WARNING", message: "Event name is empty"}
  • {status: "WARNING", message: "Event properties are empty"}
  • {status: "WARNING", message: "User identities are empty"}
  • {status: "WARNING", message: "User IDs already set"}
  • {status: "WARNING", message: "User IDs not set as consent not provided"}
  • {status: "WARNING", message: "Page properties are empty"}
  • {status: "WARNING", message: "User properties are empty"}
  • {status: "WARNING", message: "Event not logged as consent not provided"}
  • {status: "WARNING", message: "Page properties not set as consent not provided"}
  • {status: "WARNING", message: "User properties not set as consent not provided"}

Error Messages

When the function encounters issues with the data provided or an exception occurs, it returns an ERROR status with a descriptive message.
  • {status: "ERROR", message: "<error_message>"}
Example
  • {status: "ERROR", message: "Failed to update user identities"}
  • {status: "ERROR", message: "Invalid data format"}
  • {status: "ERROR", message: "Null pointer exception"}
Last modified on February 26, 2026