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

[renderers-js] Should safeFetch helpers also be safe from decoding errors? #80

Open
lorisleiva opened this issue Jun 19, 2024 · 1 comment
Labels
proposal Suggesting a change / new feature

Comments

@lorisleiva
Copy link
Member

The safeFetch and safeFetchAll helpers from the JS renderers are currently safe from accounts that are missing on-chain. That is, if the account is missing, the function will return null.

However, if the account exists but the fetched account doesn't follow the expected serialisation of the account, this function will fail instead of returning null.

Is this the expected behaviour? Should we also allow accounts that are not following the correct serialisation to return null? How safe should these safeFetch helpers be?

@lorisleiva lorisleiva added the proposal Suggesting a change / new feature label Jun 19, 2024
@4lve
Copy link

4lve commented Nov 6, 2024

I would like them to be super safe by default due to the safe prefix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Suggesting a change / new feature
Projects
None yet
Development

No branches or pull requests

2 participants