Fork me on GitHub
#pathom
<
2020-05-09
>
Tuomas09:05:47

A newbie here. I’m developing a fulcro app, with http-kit server+pathom backend locally. I’m deploying to datomic cloud solo as and exposing the api as an ion. The frontend is in a s3 website bucket. The idea is to get a static website, authorize with tokens and work with a pathom api that runs on a datomic cloud system and is exposed as an ion. Everything is fine locally, but after deploy I’m getting:

["^ ","~:session/current-user","~:com.wsscode.pathom.core/reader-error","~:com.wsscode.pathom.core/errors",["~#cmap",[["^0"],"class java.lang.NullPointerException"]]]
I made a fast PoC few months back that worked fine. Any tips for debugging? I’m suspecting this has something to do with initializing the db but thought I’d ask here first if it’s something obvious.

4
Tuomas16:05:53

I got it. Pretty obvious. So if you are using a

p/error-handler-plugin
then your resolvers are wrapped in try catch and you get the errors back in that form. Similar to GraphQL. Also, not all clojure functions can handle nil, for example string/split and <. Newbies should always test forms with nil to avoid NullPointerExceptions

wilkerlucio22:05:26

one other tip if you need to debug in prod, set ::p/process-error (fn [env err] (log-somehow err) (p/error-message err)) on your env to have more visibility on the errors

👍 4