Bug 1919565

Summary: Error: Request failed with status code 422 if you miss adding HTTP or HTTPS before proxy IP or hostname
Product: Red Hat Satellite Reporter: Ganesh Payelkar <gpayelka>
Component: SettingsAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Devendra Singh <desingh>
Severity: medium Docs Contact:
Priority: high    
Version: 6.9.0CC: ahumbe, apatel, mhulan, oezr
Target Milestone: 6.9.0Keywords: Regression, Triaged, UserExperience
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-17 14:32:14 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 Ganesh Payelkar 2021-01-23 17:39:28 UTC
Description of problem:

Error: Request failed with status code 422 if you miss adding HTTP or HTTPS before proxy IP or hostname 

Oh no! Something went wrong while submitting the form, the server returned the following error: Error: Request failed with status code 422


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


How reproducible:
New installation

Steps to Reproduce:
1. Go to Administer --> Settings --> General 
2. Update "HTTP(S) proxy without HTTP:// or https://
3. 

Actual results:

Oh no! Something went wrong while submitting the form, the server returned the following error: Error: Request failed with status code 422

==> /var/log/foreman/production.log <==
2021-01-23T22:52:15 [I|app|9072d123] Started PUT "/api/settings/92" for 127.0.0.1 at 2021-01-23 22:52:15 +0530
2021-01-23T22:52:15 [I|app|9072d123] Processing by Api::V2::SettingsController#update as JSON
2021-01-23T22:52:15 [I|app|9072d123]   Parameters: {"setting"=>{"value"=>"[FILTERED]"}, "apiv"=>"v2", "id"=>"92"}
2021-01-23T22:52:15 [E|app|9072d123] Unprocessable entity Setting::General (id: 92):
 9072d123 |   Not a valid URL for a HTTP Proxy
 9072d123 | 
2021-01-23T22:52:15 [I|app|9072d123]   Rendering api/v2/errors/unprocessable_entity.json.rabl within api/v2/layouts/error_layout
2021-01-23T22:52:15 [I|app|9072d123]   Rendered api/v2/errors/unprocessable_entity.json.rabl within api/v2/layouts/error_layout (Duration: 5.8ms | Allocations: 6602)
2021-01-23T22:52:15 [I|app|9072d123] Completed 422 Unprocessable Entity in 24ms (Views: 10.1ms | ActiveRecord: 2.2ms | Allocations: 17527)



Expected results:

Please print/show user-friendly error like  "Not a valid URL for a HTTP Proxy" instead of current {Oh no! Something went wrong while submitting the form, the server returned the following error: Error: Request failed with status code 422}

Additional info:

Any example on the popup would be helpful to understand the requirement, who are new to satellite

Comment 1 Brad Buckingham 2021-01-25 15:21:45 UTC
Is this a regression from 6.8?

Comment 2 Ganesh Payelkar 2021-01-25 15:51:05 UTC
6.8 just show:  "Not a valid URL for a HTTP Proxy"  on WebUI