Fork me on GitHub

@wilkerlucio is error handling for pathom3 still up in the air per the older blog post?


yeah, I'm having some ideas, but before I say them, I like to hear how you think a good error strategy would be


on Pathom 2 I copied what GraphQL was doing, and have just a separate branch of data for errors, and later add some helpers to move the error closer to the entity (for UI development that seemed a better strategy)


what you think about these current ones? and do you have another idea about how they could be?


currently depends on what you need. I think smart maps are fine, you can have errors out on them. for EQL there are more nuances. if you are not crossing the process, then each map contains all the data you need in the meta, you can use some helpers to find out about specific attribute errors. the wire is a different issue, during development is a good idea to send all the meta over the wire (this empowers pathom viz to do its things), but in prod its a lot of data to keep sending. my current idea is to have built-in plugins to handle that, they process the errors and include in the output, then we can remove the meta and just keep the errors


I spent some time on this for a while today and think that the idea of "errors" is overloaded and so it hard to pin things down to a simple implementation. Your comments above highlight this, a user accessing something they aren't authorized to is very different than a NPE in a function that formats a string. Ultimately I couldn't really think of a way to add anything useful to what pathom 2 did.


On the subject of pathom errors. It would be convenient if the EQL response would also include the full exception in data (or object) form rather than string form. For example,

com.wsscode.pathom.core/errors: {
[[:data-source/id {:portfolioKey "xyz", :appKey "xyz"}] :entity.default]: "class 401 Unauthorized
[[:data-source/id {:portfolioKey "xyz", :appKey "xyz"}] :entities]: "class 401 Unauthorized


This is from pathom2 ^^


@markaddleman thats a default that was picked because on that time Pathom was used mostly on the wire, but in highsigth was a bad pick. in pathom 3 the standard will keep errors as-is. you can change that in Pathom 2 adding the following to your env: ::p/process-error (fn [env e] e)


ah, that's great and makes my debugging life MUCH better


MVP of tooling for Pathom 3 is out 🎉 ! There is a new version of Pathom Viz app, you can download it at: More important, there is an update to the connector library: If you just update the connector library, you can use it with Pathom 3, updating the app gives you: - Support to see the root graph rendering (this view is a work in progress) - Logs tab (to log plans) - Improved auto-complete algorithm Here you can find an example usage (there is also in the README for the connector lib):

🎉 34

just also make sure you are on pathom 3 latest commit