Project

General

Profile

Bug #21554

Inconsistent Error message for invalid sort column between foreman and katello

Added by Partha Aji over 1 year ago. Updated 12 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
API
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Check out the following example that arises after
https://github.com/Katello/katello/pull/7046 gets merged to master.

[vagrant@centos7-devel-2 ~]$ curl -sku admin:changeme https://centos7-devel-2/katello/api/v2/host_collections?order=unknown%20DESC|json_reformat |tee arch_unknown_desc.txt
{
    "total": 0,
    "subtotal": 0,
    "page": null,
    "per_page": null,
    "error": "the field 'unknown' in the order statement is not valid field for search",
    "search": null,
    "sort": {
        "by": "unknown",
        "order": "DESC" 
    },
    "results": [

    ]
}
[vagrant@centos7-devel-2 ~]$ 
[vagrant@centos7-devel-2 ~]$ 
[vagrant@centos7-devel-2 ~]$ 
[vagrant@centos7-devel-2 ~]$ curl -sku admin:changeme https://centos7-devel-2/api/v2/hosts?order=unknown%20DESC|json_reformat |tee arch_unknown_desc.txt
{
    "error": {
        "message": "the field 'unknown' in the order statement is not valid field for search",
        "class": "ScopedSearch::QueryNotSupported" 
    }
}

Katello errors need to look consistent with what is provided by foreman instead.

History

#1 Updated by Eric Helms over 1 year ago

  • Legacy Backlogs Release (now unused) set to 114
  • Priority changed from Normal to Low

Also available in: Atom PDF