GiniError
public enum GiniError : Error, GiniErrorProtocol, Equatable
Enum representing different types of errors that can occur while interacting with the Gini API.
- badRequest: Error indicating that the request was invalid.
- notAcceptable: Error indicating that the request was not acceptable.
- notFound: Error indicating that the requested resource was not found.
- noResponse: Error indicating that no response was received.
- parseError: Error indicating that there was an error parsing the response.
- requestCancelled: Error indicating that the request was cancelled.
- tooManyRequests: Error indicating that too many requests have been made.
- unauthorized: Error indicating that the request was unauthorized.
- maintenance: Error indicating that the system is under maintenance.
- outage: Error indicating that the service is unavailable due to outage.
- server: Error indicating that the server is unavailable.
- noInternetConnection: Error indicating that there is no internet connection.
- clientSide: Error indicating a client-side error in the 4xx range (excluding specific cases like 404).
- unknown: An unknown error occurred.
-
Undocumented
Declaration
Swift
case badRequest(response: HTTPURLResponse? = nil, data: Data? = nil)
-
Undocumented
Declaration
Swift
case notAcceptable(response: HTTPURLResponse? = nil, data: Data? = nil)
-
Undocumented
Declaration
Swift
case notFound(response: HTTPURLResponse? = nil, data: Data? = nil)
-
Undocumented
Declaration
Swift
case noResponse
-
Undocumented
Declaration
Swift
case parseError(message: String, response: HTTPURLResponse? = nil, data: Data? = nil)
-
Undocumented
Declaration
Swift
case requestCancelled
-
Undocumented
Declaration
Swift
case tooManyRequests(response: HTTPURLResponse? = nil, data: Data? = nil)
-
Undocumented
Declaration
Swift
case unauthorized(response: HTTPURLResponse? = nil, data: Data? = nil)
-
Undocumented
Declaration
Swift
case maintenance(errorCode: Int)
-
Undocumented
Declaration
Swift
case outage(errorCode: Int)
-
Undocumented
Declaration
Swift
case server(errorCode: Int)
-
Undocumented
Declaration
Swift
case noInternetConnection
-
Undocumented
Declaration
Swift
case clientSide(response: HTTPURLResponse? = nil, data: Data? = nil)
-
Undocumented
Declaration
Swift
case unknown(response: HTTPURLResponse? = nil, data: Data? = nil)
-
Undocumented
Declaration
Swift
public var message: String { get }
-
Undocumented
Declaration
Swift
public var response: HTTPURLResponse? { get }
-
Undocumented
Declaration
Swift
public var data: Data? { get }
-
Undocumented
Declaration
Swift
static func from(statusCode: Int, response: HTTPURLResponse?, data: Data?) -> GiniError