lunatic-rs
lunatic-rs copied to clipboard
Feature/lookup nodes
Follow up with https://github.com/lunatic-solutions/lunatic/pull/131
Currently if the query is invalid we return empty list of nodes. I'm not 100% happy with this, I'll look into better error handling.
Since here its a bit tricky there are a loot of indirection's and steps for the results to get to the guest code. I saw there is an LunaticError
which shares error identifiers but didn't dive any deeper.
Ideally we would want to tell the user where the query syntax error is.
I think LunaticError
is the right way to go here. It basically "stringifys" the error so that the guest can transfer the string into its own memory and display it. We use it in cases where it's impossible to enumerate all errors, what is the case here.
Let's improve the error handling. After this PR we will need to do this across all distributed APIs.
Otherwise looks ok.