hippo-cli icon indicating copy to clipboard operation
hippo-cli copied to clipboard

hippo commands without config returns unintuitive error

Open bacongobbler opened this issue 2 years ago • 3 comments

When hippo isn't running:

><> hippo app add helloworld helloworld
Error: error in reqwest: error sending request for url (https://localhost:5309/api/app): error trying to connect: tcp connect error: Connection refused (os error 111)

With insecure TLS:

><> hippo app add helloworld helloworld
Error: error in reqwest: error sending request for url (https://localhost:5309/api/app): error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1914: (self signed certificate)

Should probably be:

hippo app add helloworld helloworld
Error: No configuration file found. Please log in using `hippo login`

bacongobbler avatar Mar 31 '22 20:03 bacongobbler

I don't know enough to be sure, but "No configuration file found" may be an implementation detail. Might it be better to say "Not logged in. Please log in..."?

You could still put "No configuration file found" in the logs in case someone is trying to diagnose why they are not logged in.

itowlson avatar Mar 31 '22 20:03 itowlson

The reason I didn't go with "not logged in" is because bindle has a feature flag where you don't need to log in at all (bindle-server --unauthenticated), so I thought that may be a bit confusing if the user disabled authentication. But I do agree that the error message describes internal implementation details... Hmm.

bacongobbler avatar Mar 31 '22 20:03 bacongobbler

And the message says "Please log in" grin

"Your Bindle configuration is not, er. configured. Please, er, configure it," or something like that? riffles frantically through thesaurus

itowlson avatar Mar 31 '22 22:03 itowlson