             let tripId = direction.tripIdentifiers?.first,
             let stopId = direction.stops.first?.id {
 
-            Network.getDelay(tripId: tripId, stopId: stopId).perform(withSuccess: { (request) in
-                if request.success {
-                    guard (request.data != nil), let delay = request.data else {
+            Network.getDelay(tripId: tripId, stopId: stopId).performCollectingTimeline { (response) in
+                switch response.result {
+                case .success(let delayResponse):
+                    guard (delayResponse.data != nil), let delay = delayResponse.data else {
                         self.setDepartureTimeAndLiveElements(withRoute: route)
                         return
                     }

//

import UIKit

protocol TravelDistanceDelegate: NSObjectProtocol {
    func travelDistanceUpdated(withDistance distance: Double)

                    }

                    route.getFirstDepartRawDirection()?.delay = delay

                case .failure(let networkError):
                    if let error = networkError as? APIError<Error> {
                        print("\(self.fileName) \(#function) error: \(error.errorDescription ?? "") Request url: \(error.request?.url?.absoluteString ?? "")")
                        self.setDepartureTimeAndLiveElements(withRoute: route)
                    }
                }
            }
        } else {
            if let route = route {
