ErrorInfo

data class ErrorInfo(reason: ErrorReason, status: Int, code: Int, message: String)

Representation of a Conversations Error object.

This object encapsulates information about an SDK error and is passed around to listener callbacks.

Parameters

reason

Error category as a ErrorReason.

status

Error category as a classifier. Local client errors get status 0, network related errors have their HTTP error code as a status.

code

Unique code for this error.

message

Error message.

Constructors

ErrorInfo
Link copied to clipboard
fun ErrorInfo(errorCode: Int, errorMessage: String)

Create ErrorInfo from error code and corresponding message. The status will be set to #CLIENT_ERROR.

ErrorInfo
Link copied to clipboard
fun ErrorInfo(errorStatus: Int, errorCode: Int, errorMessage: String)

Create ErrorInfo from status, error code and corresponding message.

ErrorInfo
Link copied to clipboard
fun ErrorInfo(reason: ErrorReason = ErrorReason.Unknown, status: Int = 0, code: Int = 0, message: String = "")

Create ErrorInfo from reason, status, error code and corresponding message.

Types

Companion
Link copied to clipboard
object Companion

Functions

toString
Link copied to clipboard
open override fun toString(): String

Convert ErrorInfo to string representation, for example for logging.

Properties

code
Link copied to clipboard
val code: Int = 0
message
Link copied to clipboard
val message: String
reason
Link copied to clipboard
val reason: ErrorReason
status
Link copied to clipboard
val status: Int = 0