      (defendpoint POST [:as {{:keys [email]} :body}]
        (throttle/check email-throttler email)
        ...)"
-  [^Throttler {:keys [attempts field-name], :as throttler} keyy]
+  [^Throttler {:keys [attempts exception-field-key], :as throttler} keyy]
   {:pre [(or (= (type throttler) Throttler)
              (println "THROTTLER IS: " (type throttler)))
          keyy]}


     (require '[metabase.api.common.throttle :as throttle])
     (def email-throttler (throttle/make-throttler :attempts-threshold 10))"
  [field-name & {:as kwargs}]
  (map->Throttler (merge throttler-defaults kwargs {:attempts   (atom '())
                                                    :field-name field-name})))

(defn check
  "Throttle an API call based on values of KEYY. Each call to this function will record KEYY to THROTTLER's internal list;


(defrecord Throttler [;; Name of the API field/value being checked. Used to generate appropriate API error messages, so they'll be displayed in the
                      ;; right part of the screen
                      ^Keyword exception-field-key
                      ;; [Internal] List of attempt entries. These are pairs of [key timestamp (ms)], e.g. ["cam@metabase.com" 1438045261132]
                      ^Atom    attempts
                      ;; Amount of time to keep an entry in ATTEMPTS before dropping it.
