Project

General

Profile

Actions

Bug #21627

closed

Message when trying to order by attribute not supporting ordering is not helpful

Added by Swapnil Abnave over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Other commands
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

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

Description of problem:

  1. hammer host list --order id
    Error: 400 Bad Request

The id has not defined ordering on it so the failure is expected but the message is not helpful. The API sends nice message which is not propagated by hammer

[ERROR 2017-11-08 08:20:18 API] 400 Bad Request
[DEBUG 2017-11-08 08:20:18 API] {
    "error" => {
        "message" => "the field 'id' in the order statement is not valid field for search",
          "class" => "ScopedSearch::QueryNotSupported" 
    }
}

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

How reproducible:
Always

Steps to Reproduce:
1. hammer host list --order id
2. see the ouptut
3.

Actual results:
Error: 400 Bad Request

Expected results:
Error: the field 'id' in the order statement is not valid field for search

Additional info:

Actions

Also available in: Atom PDF