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"
}
}
NoteOther Cardano Rosetta endpoints like
/account/balanceor/network/statusmay 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:
/construction/payloads: Generate the unsigned transaction and the payloads that need to be signed.- Sign Locally: Sign the payloads using your private keys/mnemonics outside of Tatum to ensure security.
/construction/combine: (Critical Step) Provide the unsigned transaction and the signatures to this endpoint. It will return a formatted "signed transaction" string./construction/submit: Pass the output from the Combine step into thesigned_transactionfield of this request.
Summary Comparison:
| Input Method | Result | Reason |
|---|---|---|
| Raw CBOR Hex | ❌ Error 500 | Backend cannot parse raw hex as a Rosetta object. |
| Rosetta Combine Output | ✅ Success | Contains the necessary Rosetta-specific metadata for broadcast. |
Updated about 2 hours ago