AFException

class AFException(val message: String? = null, val isError: Boolean? = null, val detail: String? = null, val data: String? = null, val errors: List<String?>? = null) : Exception

Represents an exception that occurs during an API call.

This data class is used to deserialize error responses from the API. It extends Throwable so it can be thrown and caught like a standard exception.

Constructors

Link copied to clipboard
constructor(message: String? = null, isError: Boolean? = null, detail: String? = null, data: String? = null, errors: List<String?>? = null)

Creates an AFException with the given message.

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard
val data: String?

Additional data related to the error.

Link copied to clipboard

Additional details about the error.

Link copied to clipboard

A list of error messages.

Link copied to clipboard

A boolean flag indicating if an error occurred. Defaults to true.

Link copied to clipboard
open override val message: String?

The error message.