fromChatErrorCode

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.

Return

Error.NetworkError instance.

Parameters

chatErrorCode

The ChatErrorCode from which the error should be created.

statusCode

HTTP status code or UNKNOWN_STATUS_CODE if not available.

cause

The optional Throwable associated with the error.