Kingfisher Documentation

Enumeration Kingfisher​Error.​Response​Error​Reason

public enum ResponseErrorReason  

Represents the error reason during networking response phase.

  • invalidURLResponse: The response is not a valid URL response. Code 2001.

  • invalidHTTPStatusCode: The response contains an invalid HTTP status code. Code 2002.

  • URLSessionError: An error happens in the system URL session. Code 2003.

  • dataModifyingFailed: Data modifying fails on returning a valid data. Code 2004.

  • noURLResponse: The task is done but no URL response found. Code 2005.

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

invalid​URLResponse

case invalidURLResponse(response: URLResponse) 

The response is not a valid URL response. Code 2001.

  • response: The received invalid URL response. The response is expected to be an HTTP response, but it is not.

invalid​HTTPStatus​Code

case invalidHTTPStatusCode(response: HTTPURLResponse) 

The response contains an invalid HTTP status code. Code 2002.

  • response: The received response.

URLSession​Error

case URLSessionError(error: Error) 

An error happens in the system URL session. Code 2003.

  • error: The underlying URLSession error object.

data​Modifying​Failed

case dataModifyingFailed(task: SessionDataTask) 

Data modifying fails on returning a valid data. Code 2004.

  • task: The failed task.

no​URLResponse

case noURLResponse(task: SessionDataTask) 

The task is done but no URL response found. Code 2005.

  • task: The failed task.