Skip to content

Improve error messages for missing script #226

Open
@nielstron

Description

@nielstron

Is your feature request related to a problem? Please describe.
When submitting a transaction but the script is missing from the transacDion we currently get a cryptic error message from the node

pycardano.exception.TransactionFailedException: Namespace(EvaluationFailure=Namespace(ScriptFailures=Namespace(spend:0=[Namespace(missingRequiredScripts=Namespace(missing=['spend:0'], resolved=Namespace(spend:0='9da99ee80431fc2c07216b1e070258f97fb814ae75227ee0933cc600')))])))

Describe the solution you'd like
ideally the txbuilder checks if all necessary scripts are present and otherwise prints a human readable error like

"Script for X is missing. Did you attach the correct script in reference inputs and inputs?"

Describe alternatives you've considered
Alternatively, we can pattern match on the error messages from the node and provide some helpful comments on what could cause them and how to fix them.

Additional context
https://discord.com/channels/1077870759667580929/1099910294354001982

Metadata

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