Makes print checks basically work.

This commit is contained in:
Bryce
2024-03-16 19:50:04 -07:00
parent 5b9c4b7aef
commit a972df1d43
12 changed files with 2134 additions and 1503 deletions

View File

@@ -3,7 +3,6 @@
[auto-ap.logging :as alog]
[auto-ap.time :as atime]
[buddy.auth :refer [throw-unauthorized]]
[cheshire.core :as cheshire]
[clj-time.coerce :as coerce]
[clojure.set :as set]
[clojure.string :as str]
@@ -11,8 +10,8 @@
[com.brunobonacci.mulog :as mu]
[com.walmartlabs.lacinia.util :refer [attach-resolvers]]
[datomic.api :as dc]
[hiccup2.core :as hiccup]
[iol-ion.query :refer [entid]]))
[iol-ion.query :refer [entid]]
[slingshot.slingshot :refer [throw+]]))
(defn snake->kebab [s]
@@ -196,12 +195,22 @@
user-client-ids)))
(defn exception->notification [f]
(try
(f)
(catch Throwable e
(throw (ex-info (.getMessage e)
{:type :notification}
e)))))
(defn exception->4xx [f]
(try
(f)
(catch Throwable e
(throw (ex-info (.getMessage e)
{:type :notification}
e)))))
(throw+ (ex-info (.getMessage e) {:type :form-validation
:form-validation-errors [(.getMessage e)]}))
#_(throw (ex-info (.getMessage e)
{:type :notification}
e)))))
(defn notify-if-locked [client-id date]
(try