Skip to content

Instantly share code, notes, and snippets.

@lambdahands lambdahands/error.clj

Last active Dec 20, 2016
What would you like to do?
Datomic Client Errors
(require '[clojure.core.async :refer [<!!]]
'[datomic.client :as client])
; Connection config incomplete for brevity
(def conn (<!! (client/connect {:db-name "mydb"})))
(<!! (client/pull (client/db conn) {:selector [:db/doc]}))
; Produces data as error message.
; Value on path [:datomic.client/http-error :cause] is a spec explaination:
{:cognitect.anomalies/category :cognitect.anomalies/incorrect
{:cause "val: {:database-id \"datomic:dev://localhost:4334/mydb\", :t 1008, :next-t 1010,
:selector [:db/doc], :op :pull} fails spec: :datomic.client.protocol/request-message at: [:pull] predicate: (contains? % :eid)\n"}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.