Package-level declarations

Types

Link copied to clipboard

Enumerable that associates code returned by the Stream backend with description.

Functions

Link copied to clipboard
fun Error.copyWithMessage(message: String): Error

Copies the original Error objects with custom message.

Link copied to clipboard
fun Error.extractCause(): Throwable?

Extracts the cause from Error object or null if it's not available.

Link copied to clipboard
fun Error.NetworkError.Companion.fromChatErrorCode(chatErrorCode: ChatErrorCode, statusCode: Int = UNKNOWN_STATUS_CODE, cause: Throwable? = null): Error.NetworkError

Creates Error.NetworkError from ChatErrorCode with custom status code and optional cause.

Link copied to clipboard
fun Error.isPermanent(): Boolean

Returns true if an error is a permanent failure instead of a temporary one (broken network, 500, rate limit etc.)

Link copied to clipboard
fun Error.NetworkError.isStatusBadRequest(): Boolean
Link copied to clipboard
fun Error.NetworkError.isValidationError(): Boolean