yetitwo
05/04/2023, 9:55 PMclojure
(catch #{StatusRuntimeException StatusException} e
(let [status (StatusProto/fromThrowable e)
details (.getDetails status 0)
error-info ^ErrorInfo (.unpack details ErrorInfo)
reason (.getReason error-info)
metadata (update-keys (into {} (.getMetadataMap error-info)) keyword)]
(throw ex-info "SpiceDB client exception"
{:type :spicedb-client
:reason reason
:metadata metadata})))
is the clojure