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

Improve error messages for missing script #226

Open
nielstron opened this issue Apr 24, 2023 · 0 comments
Open

Improve error messages for missing script #226

nielstron opened this issue Apr 24, 2023 · 0 comments
Labels
enhancement New feature or request Feature request

Comments

@nielstron
Copy link
Contributor

nielstron commented Apr 24, 2023

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

@nielstron nielstron added enhancement New feature or request Feature request labels Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Feature request
Projects
None yet
Development

No branches or pull requests

1 participant