     self.isActive = true
 
     let enabledModes = modes ?? request.modes
+    guard !enabledModes.isEmpty else {
+      completion(.failure(RoutingError.invalidRequest("No modes enabled")))
+      return 0
+    }
+    
     let groupedIdentifier = TKTransportModes.groupModeIdentifiers(enabledModes, includeGroupForAll: true)
     
     var tripRequest: TripRequest! = nil

    }
    
    guard let context = request.context else {
      return 0
    }


/// A TKRouter calculates trips for routing requests, it talks to TripGo's `routing.json` API.
@objc
public class TKRouter: NSObject {
  public enum RoutingError: Error, LocalizedError {
    case invalidRequest(String)
    case noTripFound
    
    public var errorDescription: String? {
      switch self {
      case .invalidRequest(let text): return text
      case .noTripFound: return Loc.NoRoutesFound
      }
    }
  }
  
  public struct RoutingQuery {
