Unexpected

data class Unexpected(val status: Int, val message: String?, val body: String?, val code: String? = null) : KarboneError.Api

Any other non-2xx status, or a 2xx with success: false.

Constructors

Link copied to clipboard
constructor(status: Int, message: String?, body: String?, code: String? = null)

Properties

Link copied to clipboard
val body: String?

Raw response body, if it could be read, for diagnostics.

Link copied to clipboard
open override val code: String?

Carbone error code when provided, e.g. w117.

Link copied to clipboard
open override val message: String?

Raw error text from the Carbone response, if any, never rewritten.

Link copied to clipboard
open override val status: Int

HTTP status returned by Carbone.

Functions

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

Human-readable summary of this error, used as the message of KarboneException.