Bug 982107 - Duplicate error message when adding alias using invalid character or existing alias name.
Duplicate error message when adding alias using invalid character or existing...
Product: OpenShift Online
Classification: Red Hat
Component: Website (Show other bugs)
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Clayton Coleman
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-07-08 03:24 EDT by Yujie Zhang
Modified: 2015-05-14 21:28 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-01-23 22:22:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
screenshot (97.43 KB, image/png)
2013-07-08 03:24 EDT, Yujie Zhang
no flags Details
screenshot (67.89 KB, image/png)
2013-07-26 03:25 EDT, Yujie Zhang
no flags Details

  None (edit)
Description Yujie Zhang 2013-07-08 03:24:27 EDT
Created attachment 770311 [details]

Description of problem:

When adding alias using invalid char like "@@", there is error message "Unable to create alias '@@@@sf'" and also error message like "Invalid Server Alias '@@@@sf' specified", there is no necessary to display 2 error message, only "Invalid Server Alias '@@@@sf' specified" is better.

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

How reproducible:

Steps to Reproduce:
1.Login to openshift website
2.Try to add alias using invalid char like "@"

Actual results:

There is error message like "Invalid Server Alias '@@@@sf' specified" and "Unable to create alias '@@@@sf'", details see in attachment.

Expected results:

Only keep "Invalid Server Alias '@@@@sf' specified" is better.

Additional info:
Comment 1 Clayton Coleman 2013-07-09 01:02:50 EDT
The message string is not very well formatted, certainly not consistent with our other messages.  Response I see from broker is :

{"api_version":1.5,"data":null,"errors":{},"messages":[{"exit_code":105,"field":null,"severity":"error","text":"Invalid Server Alias '@@@@f' specified"}],"status":"unprocessable_entity","supported_api_versions":[1.0,1.1,1.2,1.3,1.4,1.5],"type":null,"version":"1.5"}

I would expect "field" to be set to "alias", and the message to be clearer.

  "'@@@@sf' is not a valid server alias"
Comment 2 Yujie Zhang 2013-07-11 02:29:33 EDT
Tested on devenv_3481, this issue also happens when adding alias using existing alias name, two error message will be displayed, one is "Unable to create alias 'aaaa'", another is "Alias aaaa is already registered".
Comment 5 Yujie Zhang 2013-07-26 03:25:24 EDT
Tested on devenv_3564, the error message is still duplicate when adding invalid alias, details see in attachment please.
Comment 6 Yujie Zhang 2013-07-26 03:25:59 EDT
Created attachment 778690 [details]
Comment 7 Lili Nader 2013-07-26 13:29:36 EDT
The REST API only returns one message so either the console is adding it's own message or devenv_3564 did not pick the changes

curl -k -u lnader:ppp https://localhost/broker/rest/domains/lnader/applications/app/aliases -d "id=@@@@sh"
{"api_version":1.6,"data":null,"messages":[{"exit_code":105,"field":"id","severity":"error","text":"Invalid Server Alias '@@@@sh' specified"}],"status":"unprocessable_entity","supported_api_versions":[1.0,1.1,1.2,1.3,1.4,1.5,1.6],"type":null,"version":"1.6"}
Comment 8 Yujie Zhang 2013-07-31 01:10:45 EDT
Checked on devenv_3588, the fix code has been merged in, but still got the same error.
Comment 9 openshift-github-bot 2013-09-27 03:14:51 EDT
Commit pushed to master at https://github.com/openshift/origin-server

Origin UI 72 - Membership

Squashed commit of the following:

commit f95f32d620118df77b36d37e7d7a8f7df2c5b35a
Merge: 4811aaf 37e394d
Author: Clayton Coleman <ccoleman@redhat.com>
Date:   Thu Sep 26 13:55:06 2013 -0400

commit efb17b6655146b666bafe0f3d09f2362eea8e92d
Author: Jessica Forrester <jforrest@redhat.com>
Date:   Thu Sep 26 09:33:43 2013 -0400

Includes fixes for:

Bug 982107 - Alias double error messages
Bug 997374 - Add new_namespace to oo-admin-ctl-domain
Bug 1009620 - Correct typo
Fix bug 1010849 - cancel button on domain create page returns to settings
Bug 1010818 - Make console cost aware
Bug 997374 - Update help for oo-admin-ctl-domain
Bug 983211 - Pass remote_ip to broker
Bug 996836 - Return an exit code for when a user is removed from the domain
Comment 10 Yujie Zhang 2013-10-28 02:38:11 EDT
Tested on devenv_3953, the error message is correct when adding invalid alias, so verify this bug, thanks.

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