 (defmulti slice-query (fn [format _ _] format))
 
 (defmethod slice-query "text/html"
-  [_ resource {:keys [query metadata slicedef headers dimensions]}]
+  [_ resource {:keys [request query metadata slicedef headers dimensions]}]
   (let [desc (partial concept-name metadata query)
         dataset (get-in resource [:properties :dataset])
         slice (get-in resource [:properties :slice])

                  :build_url (@project :build-url)
                  :api_name (env :api-name)})

(defn json-error
  ([status] (json-error status {}))
  ([status body]

     "text/html;charset=UTF-8"
     (layout-html resource
                  (slice-html
                   {:action (str (request-protocol request) "://" (headers "host") base-href)
                    :base-href base-href
                    :metadata-href (urls/slice-metadata-path dataset slice)
                    :dataset dataset
