Closed Juliusan closed 9 months ago
I think this is a consequence of using JSON for marshalling the error parameters, since any integer is unmarshalled as a float :man_facepalming:
See: https://github.com/iotaledger/wasp/issues/1641
I've "fixed" it for now, by forcing ErrContractNotFound to be formatted as an int. But this only works on Wasps side, not in the CLI I fear. But yeah, this is suboptimal.
Reproducing the error: Create a chain and post an incounter (or possibly any contract) request without deploying the contract to the chain. This is the output from wasp-cli while checking the result of the request:
The Error part is obviously incorrectly formatted. Contract ID is supposed to be
int32
instead offloat64
. In fact, it is logged correctly in wasp log:So I suspect, the type is lost somewhere in marshalling/unmarshalling of error parameter, but I didn't have any luck in finding the exact reason. Maybe someone else will.