iankressin / eql

Query language to interact with EVM chains
https://eql.sh
MIT License
61 stars 5 forks source link

Panics when ENS name is unregistered #13

Closed iankressin closed 2 months ago

iankressin commented 3 months ago

Description

Queries to unregistered ENS names panics with unhandled error "Invalid address".

Steps to reproduce

GET balance FROM account iankguimaraes.eth ON eth

Additional information

rizdarmwn commented 2 months ago

Should we just create an error enum and returns the error to the front? Or do you already have any idea how to do it?

iankressin commented 2 months ago

@rizdarmwn we actually already have an enum for errors associated with ENS. The problem is that we're panicking which doesn't allow the error to propagate correctly https://github.com/iankressin/eql/blob/7d1920dcd314a2114a3ff87ca95e53acef489402/crates/core/src/interpreter/backend/execution_engine.rs#L101

To fix this bug, we should remove the panic and handle the exception in a way it can be propagated upstream

rizdarmwn commented 2 months ago

@iankressin I see, I will check & do this then.