Bug 1211678

Summary: "401 Unauthorized" on add new foreman provider with invalid userid
Product: Red Hat CloudForms Management Engine Reporter: Aziza Karol <akarol>
Component: ProvidersAssignee: Brandon Dunne <bdunne>
Status: CLOSED NOTABUG QA Contact: Dave Johnson <dajohnso>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4.0CC: akarol, drieden, gmccullo, hkataria, jfrey, jhardy, mpovolny, obarenbo
Target Milestone: GA   
Target Release: 5.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-06 22:22:02 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 Aziza Karol 2015-04-14 15:06:54 UTC
Created attachment 1014379 [details]
err

Description of problem:


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

How reproducible:
100%

Steps to Reproduce:
1.Navigate to infrastructure->Configuration management
2.Add a new foreman provider with invalid user id and click on validate
3.

Actual results:
401 Unauthorized displayed in UI. see attached screenshot

Expected results:
correct validation message required

Additional info:

Comment 2 Greg McCullough 2015-04-14 16:03:12 UTC
We should identify how we are handling this for other providers.

Comment 3 Brandon Dunne 2015-04-14 21:52:04 UTC
We're rescuing the RestClient::Unauthorized exception and re-raising MiqException::MiqInvalidCredentialsError with the error message

Should we be changing our message to something other than the error message?

Comment 4 Aziza Karol 2015-04-15 12:54:07 UTC
yes,may be with more user friendly message.

Comment 5 Brandon Dunne 2015-04-29 21:53:47 UTC
John,

We're doing the same thing that we do for every other "provider".  This one just happens to return "401 Unauthorized" as the message.  Should we change this across the board to be something friendlier?

Comment 6 Brandon Dunne 2015-07-06 22:22:02 UTC
This is working as designed, we specifically rescue this exception and re-raise it this way.  If desired please open an RFE bug for providers to all return consistent error messages for known errors.

Comment 7 Red Hat Bugzilla 2023-09-14 02:57:58 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days