KKAPIError
public class KKAPIError : APIError
An immutable object that stores information about a single failed request, such as the error message.
-
Initialize an error with the given
request
url, httpresponse
,data
anderror
.Declaration
Swift
required public init(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?)
Parameters
request
A URL load request that is independent of protocol or URL scheme.
response
The metadata associated with the response to an HTTP protocol URL load request.
data
A byte buffer in memory.
error
A type representing an error value that can be thrown.
-
Initialize an error with the given
request
url, httpresponse
,fileURL
anderror
.Declaration
Swift
required public init(request: URLRequest?, response: HTTPURLResponse?, fileURL: URL?, error: Error?)
Parameters
request
A URL load request that is independent of protocol or URL scheme.
response
The metadata associated with the response to an HTTP protocol URL load request.
fileURL
A value that identifies the location of a resource, such as an item on a remote server or the path to a local file.
error
A type representing an error value that can be thrown.
-
The message of a failed request.
Declaration
Swift
public var message: String { get }