APIError
public struct APIError : Codable
Custom network API error model.
Subspec: Utility/APIError
APIError(code: 0, message: "Something went wrong!")
The APIError is a model that represents a network error that comes from an API response.
-
Network error code.
Declaration
Swift
public let code: Int -
Message of the network error.
Declaration
Swift
public let message: String -
Default initializer for the model.
Declaration
Swift
public init(code: Int, message: String)Parameters
codeNetwork error code.
messageMessage of the network error.
APIError Structure Reference