   [context err]
   (println "????" (class err))
   (let [message (.getMessage err)]
-    (-> (ufc/rsp {:message message
+    (-> (ufc/rsp {:type :error
+                  :message message
                   :code "errors.api.unexpected"})
         (http/internal-server-error))))

(defmethod handler clojure.lang.ExceptionInfo
  [context err]
  (let [message (.getMessage err)
        data (ex-data err)]
    (-> (ufc/rsp {:message message
                  :payload data})
        (http/bad-request))))

(defmethod handler org.jooq.exception.DataAccessException

        message (.getMessage err)]
    (case state
      "P0002"
      (-> (ufc/rsp {:type :error
                    :message message
                    :code "errors.api.occ"})
          (http/bad-request))

