              (async/as-channel request
                :on-open (fn [ch]
                           (async/send! ch '()
-                            {:close? true}))
-               :on-close (fn [_ _] (deliver @client-state :complete!)))))]
+                            {:close? true
+                             :on-error (fn [e]
+                                         (println "SEND ERROR send!-an-empty-sequence")
+                                         (.printStackTrace e)
+                                         (deliver @client-state e))}))
+               :on-close (fn [_ _] (deliver @client-state :complete!))
+               :on-error (fn [_ e]
+                           (println "CHANNEL ERROR send!-an-empty-sequence")
+                           (.printStackTrace e)))))]
     (replace-handler handler)
     (get-body (cdef-url))
     (is (= :complete! (read-string (get-body (str (cdef-url) "state")))))

                                            io/resource io/file)
                            {:close? true
                             :on-success #(deliver @client-state :complete!)
                             :on-error #(deliver @client-state %)})))))
        data (->> "data"
               io/resource io/file slurp)]
    (replace-handler handler)

                          (async/send! ch (.getBytes "biscuit")
                            {:close? true
                             :on-success #(deliver @client-state :complete!)
                             :on-error (fn [e]
                                         (println "SEND ERROR send!-a-byte-array")
                                         (.printStackTrace e)
                                         (deliver @client-state e))}))
               :on-error (fn [_ e]
                           (println "CHANNEL ERROR send!-a-byte-array")
                           (.printStackTrace e)))))]
    (replace-handler handler)
    (is (= "biscuit" (String. (get-body (cdef-url)))))
    (is (= :complete! (read-string (get-body (str (cdef-url) "state")))))
