Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soroban-rpc: improve missing command line arguments message #880

Merged
merged 5 commits into from
Aug 22, 2023

Conversation

tsachiherman
Copy link
Contributor

@tsachiherman tsachiherman commented Aug 21, 2023

What

Existing reported output in the case of missing command line arguments aren't great:

  • it only print out the first missing command line argument.
  • it print it out as "invalid config value" ( which is just not true )

Why

The goal is to give the user a complete set of the missing command line arguments, so that the errors could all be resolved at once instead of "tipping" the user for one missing argument at a time.

before:

soroban-rpc
Invalid config value for captive-core-config-path: captive-core-config-path is required. Please specify --captive-core-config-path on the command line or set CAPTIVE_CORE_CONFIG_PATH in the config file.

after:

soroban-rpc
The following required configuration parameters are missing:
*	captive-core-config-path is required. Please specify --captive-core-config-path on the command line or set CAPTIVE_CORE_CONFIG_PATH in the config file.
 	path to additional configuration for the Stellar Core configuration file used by captive core. It must, at least, include enough details to define a quorum set
*	history-archive-urls is required. Please specify --history-archive-urls on the command line or set HISTORY_ARCHIVE_URLS in the config file.
 	comma-separated list of stellar history archives to connect with
*	network-passphrase is required. Please specify --network-passphrase on the command line or set NETWORK_PASSPHRASE in the config file.
 	Network passphrase of the Stellar network transactions should be signed for. Commonly used values are "Test SDF Future Network ; October 2022", "Test SDF Network ; September 2015" and "Public Global Stellar Network ; September 2015"

Known limitations

n/a

@tsachiherman tsachiherman self-assigned this Aug 21, 2023
@tsachiherman tsachiherman added this to the Soroban Testnet Release milestone Aug 21, 2023
@tsachiherman tsachiherman enabled auto-merge (squash) August 21, 2023 18:48
@tsachiherman tsachiherman changed the title soroban-rpc: improve missing command line arguments soroban-rpc: improve missing command line arguments message Aug 21, 2023
@tsachiherman tsachiherman merged commit e329fb8 into main Aug 22, 2023
@tsachiherman tsachiherman deleted the tsachi/rpc-start-args branch August 22, 2023 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants