Project

General

Profile

Actions

Bug #21554

open

Inconsistent Error message for invalid sort column between foreman and katello

Added by Partha Aji over 7 years ago. Updated 8 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
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.

Actions #1

Updated by Eric Helms over 7 years ago

  • Priority changed from Normal to Low
  • Translation missing: en.field_release set to 114
Actions #2

Updated by Ian Ballou 8 months ago

  • Target version deleted (Katello Backlog)
Actions

Also available in: Atom PDF