Bug 812060 - [REST API] Domain with empty name returns two validation messages instead of one
Summary: [REST API] Domain with empty name returns two validation messages instead of one
Keywords:
Status: CLOSED DUPLICATE of bug 822018
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 1.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Clayton Coleman
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-12 16:21 UTC by Clayton Coleman
Modified: 2012-06-29 02:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-25 00:02:17 UTC
Target Upstream Version:


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

Description Clayton Coleman 2012-04-12 16:21:31 UTC
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 05:08:42 UTC
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 20:58:39 UTC
Did this get fixed?

Comment 3 Peter Ruan 2012-05-15 22:05:48 UTC
Not on PROD

Comment 4 yquan 2012-05-16 05:28:23 UTC
   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 05:29:50 UTC
Created attachment 584849 [details]
The Screenshot of error message.

Comment 6 Clayton Coleman 2012-05-16 16:28:08 UTC
Had a scathing twitter post about this - MUST FIX :)

Comment 7 Ravi Sankar 2012-05-16 22:34:11 UTC
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 08:41:44 UTC
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-25 00:02:17 UTC
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.