APIotaClientError
public enum APIotaClientError<ErrorResponse> : LocalizedError where ErrorResponse : Decodable
extension APIotaClientError: Equatable
Describes the error states generated by APIotaClient.
The ErrorResponse type should match the associated type
from an APIotaCodableEndpoint type.
-
The
URLRequestcould not be initialized with a validURL.Declaration
Swift
case clientSide -
The response body could not be decoded to the specified type.
Declaration
Swift
case decodingError(_: DecodingError) -
The request body could not be encoded to the specified type.
Declaration
Swift
case encodingError(_: EncodingError) -
The server returned a failed response indicated by a non-successful
HTTPStatusCode.If the
errorResponseBodycannot be decoded to theErrorResponsetype, the raw response bodyDatawill be returned (or emptyDataif there was no response body).Declaration
Swift
case failedResponse(statusCode: HTTPStatusCode, errorResponseBody: ErrorResponse) -
An internal error occured.
When the circumstances that caused the error cannot be determined, an
internalErrorwill be thrown.Declaration
Swift
case internalError(_: Error) -
The server returned a response that was not a
HTTPURLResponse.Declaration
Swift
case unexpectedResponse -
A localized human-readable description of the error.
Declaration
Swift
public var errorDescription: String? { get }
-
Returns a Boolean value indicating whether two
APIotaClientErrorvalues are equal.Declaration
Swift
public static func == (lhs: APIotaClientError, rhs: APIotaClientError) -> BoolParameters
lhsA value to compare.
rhsAnother value to compare.
Return Value
trueif the two errors are considered equal, andfalseotherwise.
View on GitHub
Install in Dash
APIotaClientError Enumeration Reference