This repository was archived by the owner on Jan 9, 2025. It is now read-only.

Description
Plutus.Model.Contract.spend fails with:
Exception: Maybe.fromJust: Nothing
CallStack (from HasCallStack):
error, called at libraries/base/Data/Maybe.hs:149:21 in base:Data.Maybe
fromJust, called at src/Plutus/Model/Contract.hs:276:10 in plutus-simple-model-0.5.2.0-4fEbkvuS1hh58koi6xqmzV:Plutus.Model.Contract
It forces user to dive into PSM source code to figure out the reason of the error, which is not the best user experience.
Proposed solution
Make a descriptive error message.
Maybe even take optional error message as a function parameter.