Skip to content

Trigger query functions could throw if template is not registered #14725

Open
@richardkapolnai-da

Description

What is the problem you want to solve?

If a Daml Trigger developer uses some query for a template which is not a RegisteredTemplate, the query silently will return an empty list and finding this bug is not completely intuitive, requires a bit of experience.

Moreover, querying for an unregistered template is probably always a bug.

What is the solution you would propose?

All Trigger.query* functions should throw an exception to be loud about the bug and suggest extending the RegisteredTemplate.

Describe alternatives you've considered

Or, query could lazily and silently register the template, making registeredtemplate completely unnecessary.

Additional context

In attention to: @stefanobaghino-da , @ray-roestenburg-da , @remyhaemmerle-da

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions