Bug 812060 - [REST API] Domain with empty name returns two validation messages instead of one
[REST API] Domain with empty name returns two validation messages instead of one
Status: CLOSED DUPLICATE of bug 822018
Product: OpenShift Origin
Classification: Red Hat
Component: Pod (Show other bugs)
1.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Clayton Coleman
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-12 12:21 EDT by Clayton Coleman
Modified: 2012-06-28 22:40 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-24 20:02:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The Screenshot of error message. (23.91 KB, application/octet-stream)
2012-05-16 01:29 EDT, yquan
no flags Details

  None (edit)
Description Clayton Coleman 2012-04-12 12:21:31 EDT
When posting a new domain with an id of '' the messages we get back are:

"Invalid namespace: ''. Namespace must only contain alphanumeric characters."
and
"Namespace '' is too short.  Minimum length is 1 characters."

Because we display the errors the server returns to the user this causes visual confusion - we should return a single error for the case '':

"Namespace '' is too short.  Minimum length is 1 characters."

(or some other better variation)
Comment 1 yquan 2012-04-27 01:08:42 EDT
When input existed domain name and not allowed domain name such as openshift, will also prompt "Your namespace must be letters or numbers with no spaces or symbols" error massage.I think this error message is not proper.

Reproduce:
1,Log in and go to the domain name alter page.
2,Input the existed domain name or not allowed domain name.
3,Click save button.
Comment 2 Clayton Coleman 2012-05-15 16:58:39 EDT
Did this get fixed?
Comment 3 Peter Ruan 2012-05-15 18:05:48 EDT
Not on PROD
Comment 4 yquan 2012-05-16 01:28:23 EDT
   It is not fixed in devenv_1178 yet, and I found some other problem.When I input the existed namespace, and click the save button , it will return "namespace 'domaintest00' already in use. Please choose another", but I input none namespace and click the save button, the previous error message still existe. You can refer to the screenshot attachment.
Comment 5 yquan 2012-05-16 01:29:50 EDT
Created attachment 584849 [details]
The Screenshot of error message.
Comment 6 Clayton Coleman 2012-05-16 12:28:08 EDT
Had a scathing twitter post about this - MUST FIX :)
Comment 7 Ravi Sankar 2012-05-16 18:34:11 EDT
Git rev 2894737fac99d fixes the issue mentioned in the description i.e. it returns only one error in case of failures.
For comment-4, broker is returning only one error 'Domain xxx already in use. please choose another' but site is showing more errors. 
Assigning to clayton for further investigation.
Comment 8 yquan 2012-05-22 04:41:44 EDT
The duplicate error message does not prompt when input '' namespace .
But the problem in comment-4 is still exist.

You can reproduce it in website in follow steps.

1.create a domain in website
2.go the page of changing domain.
3.input existed domain name and click the save button, then "Namespace 'domiantest000' already in use. Please choose another" will be prompted.
4.input domain name with empty, and click the save.
5.The "Namespace 'domiantest000' already in use. Please choose another" will still exist in the page.

I think it is page's problem.
I suspect it has no bussiness with the broker.
Comment 9 Clayton Coleman 2012-05-24 20:02:17 EDT
The problem in comment 8 is a dupe of bug 822018 - the JS was showing it.

*** This bug has been marked as a duplicate of bug 822018 ***

Note You need to log in before you can comment on or make changes to this bug.