Bug 1418346

Summary: API server gives incorrect error message for non-existent parameter
Product: Red Hat Satellite Reporter: Stephen Wadeley <swadeley>
Component: APIAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: medium    
Version: 6.2.0CC: cfouant, jcallaha, mhulan, sgraessl, tstrachota
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 17:44:30 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 Stephen Wadeley 2017-02-01 15:36:06 UTC
Description of problem:

API error message when using a non-existing parameter is not helpful


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

Version Satellite 6.2.6


Steps to Reproduce:
1. [root@rhel7-3-server ~]# curl -H "Accept:application/json,version=2" -H "Content-Type:application/json" -X POST -u admin:password -k -d '{"architecture_id":"1","environment_name":"production", "domain":"example.com","domain_id":1 }' https://sat6-2.example.com/api/hosts | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   172    0    78  100    94    618    745 --:--:-- --:--:-- --:--:--   746
{
    "error": {
        "message": "Domain(#74961060) expected, got String(#3712880)"
    }
}

Actual results:

{
    "error": {
        "message": "Domain(#74961060) expected, got String(#3712880)"
    }
}


Expected results:

"Unknown parameter" error.

Additional info:

Comment 2 Sebastian Gräßl 2017-08-28 14:44:39 UTC
Created redmine issue http://projects.theforeman.org/issues/20765 from this bug

Comment 3 Bryan Kearney 2018-09-04 17:44:30 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.