Error
public enum Error : Swift.Error
This enum is used for all errors that are generated by this library. Any external errors
are wrapped as unknown
errors.
-
The scheduled request is invalid due to some form of invalid parameters. This error e.g. occurs when a request with method GET or DELETE is scheduled and has a non-empty body.
Declaration
Swift
case invalidRequest(message: String)
-
Scheduling a request failed as the provided parameters cannot be encoded as desired into a valid HTTP request.
Declaration
Swift
case encodingFailed
-
A request’s response failed due to some decoding failure when serializing the response. This error is not thrown when JSON decoding fails.
Declaration
Swift
case decodingFailed
-
The scheduled request did not receive a response from the server due to a timeout.
Declaration
Swift
case timeout
-
The scheduled request did not receive a response as there is no internet connection.
Declaration
Swift
case noConnection
-
The url of the scheduled request is invalid.
Declaration
Swift
case invalidUrl
-
The host of the url of the scheduled request could not be found.
Declaration
Swift
case unknownHost
-
The response from the server could not be parsed as desired.
Declaration
Swift
case invalidResponse
-
The request resulted in a response from the server, however, the response indicates failure. The application-specific reason for the failure may be derived from the status code and the actual response.
Declaration
Swift
case requestFailed(statusCode: Int, response: Data)
-
A stream constructed by a
WebSocketRequest
was closed by the peer.Declaration
Swift
case closedStream(code: URLSessionWebSocketTask.CloseCode)
-
An error indicating that a paginated request is already in progress and a new one will not be scheduled at the moment.
Declaration
Swift
case requestInProgress
-
An error indicating that the last page of a paginated request has been reached and no further request will be scheduled.
Declaration
Swift
case requestFinished
-
An unknown error occured which cannot be described more precisely by using a particular
Squid.Error
.Declaration
Swift
case unknown(Swift.Error)