           (error-handler request))
         (not-found request)))
      ([request respond _]
-      (if-let [match (::match request)]
+      (if-let [match (::r/match request)]
         (let [method (:request-method request :any)
               result (:result match)
               handler? (or (-> result method :handler) (-> result :any :handler))

  ([{:keys [not-found method-not-allowed not-acceptable]}]
   (fn
     ([request]
      (if-let [match (::match request)]
        (let [method (:request-method request :any)
              result (:result match)
              handler? (or (-> result method :handler) (-> result :any :handler))

                  result (:result match)
                  handler (or (-> result method :handler)
                              (-> result :any (:handler default-handler)))
                  request (-> request
                              (impl/fast-assoc ::r/match match)
                              (impl/fast-assoc ::r/router router)
                              (cond-> (seq path-params) (impl/fast-assoc :path-params path-params)))]
              (handler request respond raise))
            (default-handler request respond raise))))
       {::r/router router}))))

(defn get-router [handler]
  (-> handler meta ::r/router))

(defn get-match [request]
  (::r/match request))

(defn coerce-handler [[path data] {:keys [expand] :as opts}]
  [path (reduce
