Canister call http status code 422?

I am writing code that can call a canister and call the ic in the general.
Right now Im getting a http-status-code: 422 and in the sponse-body it says: “Could not parse body as read request: invalid type: byte array, expected u64”.
Can anyone give me hints as to where this error comes from so i can fix my canister call?

This is when trying a query call to the governance-canister, method_name: get_pending_proposals.

The dart CBOR coder library set the ingress_expiry value as a bignum in the stead of a u64.

This is an interesting case actually:

  • The spec says

    Nats: Major type 0 (“Unsigned integer”) if small enough to fit that type, else the Bignum format is used.

  • This means that bignum encoding should be fine, in general for number values. But
  • For good reasons, the System does not allow absurdly high ingress_expiry values. This means that
  • All “reasonable” values are less than 2^64, and
  • According to the spec, these values must be encoded as Major type 0, as they are small enough, so
  • The replica doesn’t even bother parsing BigNums just to then reject with “expiry too large”.