ApiError
public enum ApiError : Error, LocalizedError, @unchecked Sendable
Represents API errors that occur during response transformation.
@unchecked Sendable is used here because the associated [String: Any] JSON dictionary
does not conform to Sendable in Swift’s type system. However, this is safe in practice
because the dictionary is populated once at the call site during response parsing and is
never mutated after the error value is constructed. All access is read-only.
-
An error containing an HTTP status code, a JSON object, and a descriptive message.
Declaration
Swift
case error(Int, [String : Any], String)Parameters
statusThe HTTP status code of the error.
jsonThe JSON data associated with the error.
messageA descriptive message explaining the error.
-
Declaration
Swift
public var errorDescription: String? { get }
View on GitHub