dfinity / sdk

IC SDK: a Software Development Kit for creating and managing canister smart contracts on the ICP blockchain.
https://internetcomputer.org/developers
Apache License 2.0
176 stars 85 forks source link

chore: improve error message when local replica not running #3973

Closed sesi200 closed 2 weeks ago

sesi200 commented 2 weeks ago

Description

The current error message for a non-running local replica is not great:

Error: Failed while waiting for agent status.
Caused by: An error happened during communication with the replica: error sending request for url (http://127.0.0.1:4943/api/v2/status)
Caused by: error sending request for url (http://127.0.0.1:4943/api/v2/status)
Caused by: client error (Connect)
Caused by: tcp connect error: Connection refused (os error 61)
Caused by: Connection refused (os error 61)

This PR adds a nice message explaining in understandable words what the problem is and what to do.

How Has This Been Tested?

added e2e, some manual testing

Checklist: