Failure

@Serializable
@SerialName(value = "false")
data class Failure(val errorCode: Int, val description: String? = null, val parameters: ResponseParameters? = null) : Response<Nothing>

Constructors

Link copied to clipboard
constructor(errorCode: Int, description: String? = null, parameters: ResponseParameters? = null)

Properties

Link copied to clipboard
val description: String? = null
Link copied to clipboard
Link copied to clipboard
val ok: Boolean
Link copied to clipboard

Functions

Link copied to clipboard
fun <T> Response<T>.getOrNull(): T?

Get response or null on failure.

Link copied to clipboard

Whether the request completed successfully.

Link copied to clipboard
inline fun <T> Response<T>.onFailure(block: (Response.Failure) -> Unit): T?