Project

General

Profile

Actions

Bug #20765

closed

API server gives incorrect error message for non-existent parameter

Added by Sebastian Gräßl over 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1418346

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.

Actions #1

Updated by Tomer Brisker over 5 years ago

  • Category changed from 19 to API
Actions #2

Updated by Leos Stejskal over 2 years ago

  • Subject changed from API server gives incorrect error message for non-existent parameter to API server gives incorrect error message for non-existent parameter
  • Status changed from New to Closed

Hi, it’s been a while since the last update, so I'm closing the issue.
If you think that the issue is still relevant, please feel free to reopen it.

Actions

Also available in: Atom PDF