View:networks getting error 500 missing 'metadata' on request body

Hey there,
I’m new to the Rosetta community and was wondering how I can set the request body when testing the endpoints with the Rosetta CLI. The endpoint network/list is working when I call it with the swagger doc in the browser.
Thank you!

Hi Shirin!

Welcome to the community! With Rosetta CLI, you don’t necessarily test endpoints. The CLI simply performs some integration tests with its check:data and check:construction commands.

At a high level, the check:data command verifies that the operations reported by block/transaction endpoint for an account, correctly add up to the balance reported by account/balance endpoint for that account. The check:construction command verifies that operations in submitted transactions match the operations reported by block/transaction endpoint once the transactions lands on chain.

Please take a look at the Readme for CLI and also the DSL utilized by check:data.

Hope this helps.

Feel free to post in the community if you run into issues or have more questions :slight_smile:

I forgot to answer the question in the title. Some tips to debug:

  1. From the error message, it appears that the Rosetta node is expecting metadata to be present in the network/list request. But, metadata is an optional attribute per the Rosetta spec. The CLI is very likely calling network/list without any metadata.

  2. Configurations for the CLI are provided via a json file as you probably already know. But, the configuration does not let you specify request details for specific endpoints, due to reasons described in the prior comment.


Hey Swapna!
Thank you so much for your response, I appreciate the help! My mistake was that I did’n return the response in the right structure but it’s working now.