ZyncError

sealed class ZyncError

Simplified error hierarchy for SDK operations.

This minimal error set covers all SDK error scenarios while remaining simple and Swift-friendly through SKIE conversion.

Swift usage (via SKIE):

switch error {
case .network:
// Handle network connectivity issues
case .unknown(let message, let code):
// Handle all other errors with descriptive message
}

Inheritors

Types

Link copied to clipboard
@ObjCName(name = "canceled")
data object Canceled : ZyncError

Operation was canceled by the user or the application

Link copied to clipboard
@ObjCName(name = "unknown")
data class Error(val message: String, val httpStatusCode: Int? = null) : ZyncError

Generic error for most scenarios including authentication, validation, business logic violations, database issues, etc.

Link copied to clipboard
@ObjCName(name = "network")
data object Network : ZyncError

Network connectivity error. Indicates issues like no internet connection, timeouts, or server unavailability.