Skip to content

Instantly share code, notes, and snippets.

@lambdahands
Last active December 20, 2016 04:25
Show Gist options
  • Save lambdahands/72f87e71c0fc3aeac6f8707b67f42da7 to your computer and use it in GitHub Desktop.
Save lambdahands/72f87e71c0fc3aeac6f8707b67f42da7 to your computer and use it in GitHub Desktop.
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
:datomic.client/http-error
{: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