           :created-at timestamp
           :updated-at timestamp})
         insert (pool/with-pool [conn pool/rethinkdb-pool]
-                 (-> (r/table table-name)
-                     (r/insert timed-resource)
-                     (r/run conn)))]
+                 (with-timeout default-timeout
+                   (-> (r/table table-name)
+                       (r/insert timed-resource)
+                       (r/run conn))))]
   (if (= 1 (:inserted insert))
     timed-resource
     (throw (RuntimeException. (str "RethinkDB insert failure: " insert))))))

    (select-keys [:avatar :image :user-id :name])
    (clojure.set/rename-keys {:avatar :image})))

;; ----- Resource CRUD funcitons -----

(defn create-resource

          :created-at (:created-at original-resource)
          :updated-at timestamp})
        update (pool/with-pool [conn pool/rethinkdb-pool]
                 (with-timeout default-timeout
                   (-> (r/table table-name)
                       (r/get (original-resource primary-key-name))
                       (r/replace timed-resource)
                       (r/run conn))))]
  (if (or (= 1 (:replaced update)) (= 1 (:unchanged update)))
    timed-resource
    (throw (RuntimeException. (str "RethinkDB update failure: " update)))))))
