   (:require [compojure.core :as compojure.core]
             [compojure.response :as compojure.res]
             [integrant.core :as ig]
+            [akvo.lumen.specs.components :refer (integrant-key)]
+            [clojure.spec.alpha :as s]
             [ring.middleware.defaults]
             [ring.middleware.json]
             [ring.middleware.stacktrace]

          (-> (compojure.res/render error-response request)
              (ring.response/content-type "text/html")
              (ring.response/status 404))))))

              (ring.response/content-type "text/html")
              (ring.response/status 500)))))))

(s/def ::error-response string?)

(defmethod integrant-key :akvo.lumen.component.handler/wrap-hide-errors [_]
  (s/cat :kw keyword?
         :config (s/keys :req-un [::error-response])))

(defmethod ig/init-key :akvo.lumen.component.handler/wrap-not-found  [_ {:keys [error-response]}]
  (fn [handler]
    (fn [request]
