apache / apache/openwhisk-cli

Return Nicer Errors when Non-Integer Values are Passed as Integer Arguments (CLI)

Open
#132 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
109
Forks
98
PR merge metrics
No merged PRs in 30d

Description

@dubeejw commented on [Tue May 23 2017](https://github.com/apache/incubator-openwhisk/issues/2279)

`$ wsk action create actionName hello.js --timeout 30303030300303030303003`

`invalid argument "30303030300303030303003" for --timeout: strconv.ParseInt: parsing "30303030300303030303003": value out of range`

`$ wsk action create actionName hello.js --timeout asdf`

`invalid argument "asdf" for --timeout: strconv.ParseInt: parsing "asdf": invalid syntax`

---

@lzbj commented on [Tue Jul 11 2017](https://github.com/apache/incubator-openwhisk/issues/2279#issuecomment-314382791)

@dubeejw , I think this kind of error is throw by cobra package, right? can we control it?

---

@dubeejw commented on [Wed Jul 12 2017](https://github.com/apache/incubator-openwhisk/issues/2279#issuecomment-314658021)

I believe we can control the error message if we surround the `strconv.ParseInt` method calls in a try/catch, @lzbj. Will look to make sure.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.