Bug 868435

Summary: error message for invalid rhc app create --timeout should be more specific.
Product: OKD Reporter: Peter Ruan <pruan>
Component: ocAssignee: Hiro Asari <hasari>
Status: CLOSED WONTFIX QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: hasari, jkeck
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-16 17:08:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Ruan 2012-10-19 20:43:51 UTC
Description of problem:
error message for invalid rhc app create --timeout should be more specific.  In the previous version, if the user typed in the incorrect timeout value, the error message reads 'Timeout must be specified as a number greater than 0'.  Currently, the error message is very geneic. invalid argument: --timeout test


Version-Release number of selected component (if applicable):
rhc 0.99.9


How reproducible:

always

Steps to Reproduce:
1. rhc app create testapp php-5.3 --timeout test
2.
3.
  
Actual results:
invalid argument: --timeout test


Expected results:
should give an error message that's more appropriate like 'time out value must be integer greater than 0'

Additional info:

Comment 1 Hiro Asari 2012-11-16 17:08:00 UTC
Right now, the output includes this bit.

===
Global Options
  -l, --rhlogin login       OpenShift login
  -p, --password password   OpenShift password
  -d, --debug               Turn on debugging
  --noprompt                Suppress the interactive setup wizard from running before a command
  --config FILE             Path of a different config file
  -h, --help                Display help documentation
  -v, --version             Display version information
  --timeout seconds         Set the timeout in seconds for network commands
===

Going beyond this will probably be too problematic, since the message "invalid argument: --timeout test" is ultimately coming from Ruby's standard library, and there is no easy way to customize the message. We might be able to *guess* what arguments might have been passed, but I suspect it will lead to some unmaintainable error checking.

I'm marking this as WONTFIX.