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

dazl.ledgerutil.ACS methods should throw exceptions (or return warnings) when asked for a non-existent template #248

Open
da-tanabe opened this issue May 10, 2021 · 0 comments

Comments

@da-tanabe
Copy link
Contributor

The following code snippet silently returns an empty dict, and it probably could do something more helpful:

queries = {"Some:Tmpl": None}
async with ACS(..., queries) as acs:
    snapshot = await acs.read()

    # returns an empty dict, but doesn't warn or raise an error
    snapshot.matcing_contracts("Some:Tmpl2")

These calls will always fail, and this can be detected; some way of informing the user that they made a mistake would be useful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant