···11+import Foundation
22+33+public enum ATProtoError: Error, Sendable {
44+ case network(URLError)
55+ case http(status: Int, body: Data?)
66+ case xrpc(code: String, message: String?, status: Int)
77+ case decoding(String)
88+ case invalidIdentity(String)
99+ case cidMismatch(expected: CID, actual: CID?)
1010+ case notAuthenticated
1111+ case scopeDenied(requested: String, granted: Set<String>)
1212+ case invalidURL(String)
1313+1414+ public struct XRPCEnvelope: Decodable, Sendable {
1515+ public let error: String
1616+ public let message: String?
1717+ }
1818+}