AFErrorKind

What kind of failure an AFException represents, classified by the SDK the same way on every platform.

Use it to choose your own localized copy, an icon, or whether to offer a retry. AFException.message is already safe to show a member for every kind; AFException.technicalMessage holds the diagnostic text for logs.

Entries

Link copied to clipboard

The device has no usable connection, or the server could not be reached.

Link copied to clipboard

The request or connection took too long. Usually worth retrying.

Link copied to clipboard

A secure (TLS) connection could not be established.

Link copied to clipboard

The session is missing, expired or rejected (HTTP 401).

Link copied to clipboard

The server failed (HTTP 5xx or 429). Usually worth retrying later.

Link copied to clipboard

The server rejected the request (HTTP 4xx). When the server sent a message for the member, AFException.message carries it unchanged.

Link copied to clipboard

The server answered with something the SDK could not read.

Link copied to clipboard

Anything else.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.