NetworkError

sealed class NetworkError(message: String, val code: Int) : Exception

Represents an error that occurred while sending or processing a ConversationEntry.

Access the specific error type via pattern matching on the sealed subclasses. Use ConversationEntry.error to retrieve the error associated with a failed entry.

Inheritors

Constructors

Link copied to clipboard
protected constructor(message: String, code: Int)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

A server expectation was not met (HTTP 417).

Link copied to clipboard
class FileSizeLimitError(message: String, val fileSizeLimit: Int = parseFileSizeLimit(message)) : NetworkError

The attached file exceeds the server's size limit (HTTP 413).

Link copied to clipboard
class GeneralError(message: String) : NetworkError

A general or unrecognized error.

Link copied to clipboard

The server rejected the request because a precondition was not met (HTTP 412).

Link copied to clipboard

The attached file type is not supported by the server (HTTP 415).

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
val code: Int

The HTTP status code associated with this error.

Link copied to clipboard
open val message: String?