Kingfisher Documentation

Enumeration Kingfisher​Error.​Request​Error​Reason

public enum RequestErrorReason  

Represents the error reason during networking request phase.

  • emptyRequest: The request is empty. Code 1001.

  • invalidURL: The URL of request is invalid. Code 1002.

  • taskCancelled: The downloading task is cancelled by user. Code 1003.

Member Of

KingfisherError

Represents all the errors which can happen in Kingfisher framework. Kingfisher related methods always throw a KingfisherError or invoke the callback with KingfisherError as its error type. To handle errors from Kingfisher, you switch over the error to get a reason catalog, then switch over the reason to know error detail.

Enumeration Cases

empty​Request

case emptyRequest

The request is empty. Code 1001.

invalid​URL

case invalidURL(request: URLRequest) 

The URL of request is invalid. Code 1002.

  • request: The request is tend to be sent but its URL is invalid.

task​Cancelled

case taskCancelled(task: SessionDataTask, token: SessionDataTask.CancelToken) 

The downloading task is cancelled by user. Code 1003.

  • task: The session data task which is cancelled.

  • token: The cancel token which is used for cancelling the task.