 
 import Foundation
 
+/// MXSpace operation error
+public enum MXSpaceError: Int, Error {
+    case homeserverNameNotFound
+    case unknown
+}
+
+extension MXSpaceError: CustomNSError {
+    public static let errorDomain = "org.matrix.sdk.space"
+
+    public var errorCode: Int {
+        return Int(rawValue)
+    }
+
+    public var errorUserInfo: [String: Any] {
+        return [:]
+    }
+}
+
 /// A Matrix space enables to collect rooms together into groups. Such collections of rooms are referred as "spaces" (see https://github.com/matrix-org/matrix-doc/blob/matthew/msc1772/proposals/1772-groups-as-rooms.md).
 public class MXSpace: NSObject {
     

    
    // MARK: - Setup
    
    init(room: MXRoom) {
        self.room = room
        super.init()
    }
}

    /// The underlying room
    public let room: MXRoom
    
    /// Shortcut to the room roomId
    public var spaceId: String {
        return self.room.roomId
    }
    
    /// Shortcut to the room summary
    public var summary: MXRoomSummary? {
        return self.room.summary
