Nexmo / nexmo-cli

Nexmo CLI (Command Line Interface)
https://nexmo.com
MIT License
78 stars 52 forks source link

Define nexmo setup structure in error message #209

Closed michaeljolley closed 4 years ago

michaeljolley commented 4 years ago

While going through several tutorials, the steps did not mention running nexmo setup between npm install nexmo-client and nexmo app:create ....

This resulted in receiving the following error message:

Could not initialize Nexmo library. Please run 'nexmo setup' to setup the CLI correctly.

While the tutorials have been updated to reflect this step, it would have been helpful if the error itself gave the full parameters of the command. As in:

Could not initialize Nexmo library. Please run 'nexmo setup ' to setup the CLI correctly.

This would prevent the need to research what parameters were needed and could help the user more quickly execute the command and continue. It's a quick change and I'd love to knock it out if you think it would be useful.

michaeljolley commented 4 years ago

@AlexLakatos, I'd love your feedback on this when you've got a minute.

https://github.com/Nexmo/nexmo-cli/blob/69d5a0b0a5e24a459a8eb0217191511eb15e7251/src/client.js#L45-L53

One issue I could foresee is if the nexmo setup signature ever changed we'd have to update this code as well.