Some errors come back as part of the ExecutionPlan (like InsufficientBalanceError), but others get thrown as InvariantError (like "user has no supply to withdraw").
This means I need both try-catch AND result checking to handle all cases. Would be cleaner if validation errors were returned via ResultAsync.Err instead of thrown.
Is this intentional?
Using @aave/client 0.9.2
Some errors come back as part of the ExecutionPlan (like InsufficientBalanceError), but others get thrown as InvariantError (like "user has no supply to withdraw").
This means I need both try-catch AND result checking to handle all cases. Would be cleaner if validation errors were returned via ResultAsync.Err instead of thrown.
Is this intentional?
Using @aave/client 0.9.2