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

listTargets when zsapi.ini is missing #96

Open
zvikazend opened this issue Apr 27, 2017 · 0 comments
Open

listTargets when zsapi.ini is missing #96

zvikazend opened this issue Apr 27, 2017 · 0 comments

Comments

@zvikazend
Copy link
Contributor

API automation should get a message and not exception, in order to parse and continue the flow.
With no zsapi.ini, we get an exception instead of something like: ini files does not exist, or no targets found.

Error

$ zs-client.sh listTargets
Name           |            URL
--------------------------------
local => http://127.0.0.1:10081
$ rm /home/zvika/.zsapi.ini
$ zs-client.sh listTargets
======================================================================
   The application has thrown an exception!
======================================================================
 Zend\Config\Exception\RuntimeException
 File '/home/zvika/.zsapi.ini' doesn't exist or not readable

Manual fix

Do touch .zsapi.ini, command returns output with no records.

$ touch /home/zvika/.zsapi.ini
$ zs-client.sh listTargets
Name           |            URL
--------------------------------

Sort of an extension to issue #76
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant