Skip to content

Should safeFetch helpers also be safe from decoding errors? #5

@lorisleiva

Description

@lorisleiva

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions