Cardano - Rosetta: "Error: (intermediate value) is not iterable"

When using the Cardano Rosetta, you may encounter an HTTP 500 error when attempting to submit a transaction. This guide explains why this happens and how to resolve it by following the correct Rosetta construction flow.


The Issue

Users calling the /construction/submit endpoint may receive the following error response:

{
  "code": 5006,
  "message": "Error when sending the transaction",
  "retriable": true,
  "details": {
    "message": "Error: (intermediate value) is not iterable"
  }
}
📘

Note

Other Cardano Rosetta endpoints like /account/balance or /network/status may work perfectly even if your construction flow is incorrect, as they do not require transaction parsing.

Root Cause

This error typically occurs when raw CBOR hex is submitted directly to the /construction/submit endpoint.

The Cardano Rosetta implementation expects the signed_transaction field to contain a specific JSON structure generated by the Rosetta Combine phase, rather than a raw blockchain-native transaction. If the backend receives raw CBOR, the deserialization process fails, resulting in the "is not iterable" JavaScript runtime error.


The Solution: Follow the Rosetta Construction Flow

To successfully broadcast a transaction on Cardano using Rosetta, you must follow the multi-step construction process. Submitting a transaction requires more than just a signature; it requires the metadata and structure provided by the preceding endpoints.

Expected Workflow:

  1. /construction/payloads: Generate the unsigned transaction and the payloads that need to be signed.
  2. Sign Locally: Sign the payloads using your private keys/mnemonics outside of Tatum to ensure security.
  3. /construction/combine: (Critical Step) Provide the unsigned transaction and the signatures to this endpoint. It will return a formatted "signed transaction" string.
  4. /construction/submit: Pass the output from the Combine step into the signed_transaction field of this request.

Summary Comparison:

Input MethodResultReason
Raw CBOR HexError 500Backend cannot parse raw hex as a Rosetta object.
Rosetta Combine OutputSuccessContains the necessary Rosetta-specific metadata for broadcast.