    :errors/bulk-load-with-errrors 12
    :errors/els-status-4xx         13})
 
+
+
 (defn make-error
   ([type message data]
    (make-error type message data nil))

      (assoc      :state :retry)))


(defmethod transition :retry
  [s]
  (with-state-machine s
    :on-error   retry-error
    :on-success (fn [{{:keys [state]} :retry :as s}] (assoc s :state state))
    (fn [{{:keys [delayer]} :retry}]
      (delayer)
      nil)))


(defn dispatch-error

     (dispatch-error

       #{:errors/network-error
         :errors/kafka-unavailable}   retry-action

       :errors/message-to-big         send-to-errors

       :errors/offset-not-available   reset-offset

       #(= % :errors/topic-not-found) retry-action
       :errors/partition-not-found    retry-action

      (fn [s e]
         (throw (make-error :errors/uncategorized \"Unknown error\" {} e))))
