lunatic-rs icon indicating copy to clipboard operation
lunatic-rs copied to clipboard

Feature/lookup nodes

Open kosticmarin opened this issue 2 years ago • 2 comments

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.

kosticmarin avatar Sep 07 '22 09:09 kosticmarin

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.

bkolobara avatar Sep 07 '22 11:09 bkolobara

Let's improve the error handling. After this PR we will need to do this across all distributed APIs.

Otherwise looks ok.

withtypes avatar Sep 08 '22 06:09 withtypes