Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Improve error message on access calls #71

Open
moritzkirstein opened this issue Feb 27, 2024 · 0 comments
Open

[Enhancement] Improve error message on access calls #71

moritzkirstein opened this issue Feb 27, 2024 · 0 comments
Labels
Type: Enhancement Feature enhancement request

Comments

@moritzkirstein
Copy link
Contributor

Motivation / Problem

When trying to access an asset of type != 'access', the function call fails with a long stack trace.

Solution

We should imrpove the error handling and check if we can just verify the correct type of asset, even before doing the provider calls.

Alternatives

Additional context

Error trace

Creating new Nautilus instance with signer 0x...
[aquarius] Retrieve asset did:op:f2163fe539c72bf255fe96c8af32ae57b16ed4db76f71555d2401db0ec2dfb54 using cache at https://aquarius510.v4.delta-dao.com/
Error getting access details:  Cannot read properties of undefined (reading 'token')
[access] AccessDetails: undefined
Error initializing provider for access!
TypeError: Cannot read properties of undefined (reading 'id')
    at C:\node_typescript\node_modules\@deltadao\nautilus\src\utils\provider.ts:61:15
    at _catch (C:\node_typescript\node_modules\@deltadao\nautilus\src\utils\order.ts:251:2)
    at initializeProvider (C:\node_typescript\node_modules\@deltadao\nautilus\src\utils\provider.ts:56:44)
    at C:\node_typescript\node_modules\@deltadao\nautilus\src\access\index.ts:57:32
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async access (C:\node_typescript\utils\access.ts:4:21)
TypeError: Cannot read properties of null (reading 'providerFee')
    at C:\node_typescript\node_modules\@deltadao\nautilus\src\access\index.ts:69:20
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
@moritzkirstein moritzkirstein added the Type: Enhancement Feature enhancement request label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Feature enhancement request
Projects
None yet
Development

No branches or pull requests

1 participant