corectl icon indicating copy to clipboard operation
corectl copied to clipboard

Improve response from status when invalid app

Open carlioth opened this issue 6 years ago • 3 comments

When running corectl with app in config file, and the app doesn't exist the status command will not give a good response.

corectl -c local-corectl.yaml status

ERROR could not open app with ID '1fa8a65f-855e-4f7c-bbdc-1f81739e1d96': Could not find app: App not found (1003)

Inform that the app doesn't exist, but also print engine information.

carlioth avatar Sep 03 '19 11:09 carlioth

Supplying an app to the status command will trigger a different flow since a session towards the app will be opened instead to supply info regarding the data model etc.

Not a bug in my opinion since an invalid parameter was passed.

wennmo avatar Sep 03 '19 12:09 wennmo

Looking at the status help text:

status Print status info about the connection to the engine and current app

I would expect to get info about engine and current app. How do I know that supplying an app will trigger a different flow?

carlioth avatar Sep 03 '19 12:09 carlioth

I was more referring to that supplying invalid parameters to a command should result in a fatal error -> exit code 1. At least that is the approach we have for other commands.

As an end-user I would want the command to fail if I had faulty params in e.g. my config, but lets take a discussion on what should be included in the status command. I agree that we need to do a retake on what should be presented.

wennmo avatar Sep 03 '19 15:09 wennmo