pact icon indicating copy to clipboard operation
pact copied to clipboard

When defining a table with not enough arguments the wrong error message gets thrown

Open EnoF opened this issue 2 years ago • 2 comments

When defining a table with not enough arguments, I received the following error:

pact/offchain.pact:56:6:OutputFailure: native function supplied too many args: [Table n_bd7f56c0bc111ea42026912c37ff5da89149d9dc.offchain.offchain-pool11::table:{n_bd7f56c0bc111ea42026912c37ff5da89149d9dc.offchain.offchain-pool-schema}, Object object12::object:* {"accounts-count": Prim integer13::integer = LInteger {_lInteger = 0},"name": Var create-pool_name0::string}]

Which I believe should instead of native function supplied too many args state native function supplied not enough args. Since the code that threw this was:

  (insert offchain-pool
    { "name": name
    , "accounts-count": 0
  })

EnoF avatar Feb 15 '23 11:02 EnoF

Nice find, thank you @EnoF.

jwiegley avatar Feb 24 '23 22:02 jwiegley

Thanks @EnoF - we'll put this on the TODO pile

emilypi avatar Feb 27 '23 22:02 emilypi