Api Error

data class ApiError(    var message: String = "",     var code: Int = 0,     var status: Boolean = false)

Base API error response

Author

Jimly A.

Since

04-Jun-20.

Constructors

Link copied to clipboard
fun ApiError(    message: String = "",     code: Int = 0,     status: Boolean = false)

instance of Error Response

Properties

Link copied to clipboard
@SerializedName(value = "resultCode", alternate = ["code"] )
var code: Int = 0

response code

Link copied to clipboard
@SerializedName(value = "message", alternate = ["resultMessage", "error"] )
var message: String

message of the API

Link copied to clipboard
@SerializedName(value = "success" )
var status: Boolean = false

does the process success?

Sources

Link copied to clipboard