Project

General

Profile

Actions

Bug #3869

closed

API error messages poorly formatted

Added by Thomas McKay over 10 years ago. Updated over 5 years ago.

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

Description

GET /api/users with an unauthorized user returns in the json below. Note the missing 'results' keyword.

{
"total": 0,
"subtotal": 0,
"page": 1,
"per_page": 20,
"search": null,
"sort": {
"by": null,
"order": null
},
"": {
"message": "Access denied",
"details": null
}
}


Related issues 3 (1 open2 closed)

Related to Foreman - Feature #3011: default root name for api json index response to :results but make it configurableClosedJoseph Magen09/02/2013Actions
Related to Hammer CLI - Bug #4190: Fix error handling to match the updated api formatClosedDaniel Lobato Garcia01/27/2014Actions
Related to Foreman - Bug #4315: Hosts power management API doesn't return standard error responsesNewActions
Actions #1

Updated by Dominic Cleal over 10 years ago

  • Related to Feature #3011: default root name for api json index response to :results but make it configurable added
Actions #2

Updated by Dominic Cleal over 10 years ago

  • translation missing: en.field_release set to 2
Actions #3

Updated by Anonymous about 10 years ago

  • Target version set to 1.9.2
Actions #4

Updated by Daniel Lobato Garcia about 10 years ago

Should we go for this? It seems to me that 403 is meaningful enough for the client not to even try to read 'results'.

Actions #5

Updated by Dominic Cleal about 10 years ago

Daniel Lobato Garcia wrote:

Should we go for this? It seems to me that 403 is meaningful enough for the client not to even try to read 'results'.

I think so, because the message is valuable too for the reason, the client should be able to access it.

Actions #6

Updated by Dominic Cleal about 10 years ago

  • Status changed from New to Assigned
  • Assignee set to Daniel Lobato Garcia
Actions #7

Updated by Dominic Cleal about 10 years ago

  • translation missing: en.field_release deleted (2)
Actions #9

Updated by Daniel Lobato Garcia about 10 years ago

  • Status changed from Assigned to Ready For Testing
Actions #10

Updated by Dominic Cleal about 10 years ago

  • Related to Bug #4190: Fix error handling to match the updated api format added
Actions #11

Updated by Anonymous about 10 years ago

  • Target version changed from 1.9.2 to 1.9.1
Actions #12

Updated by Dominic Cleal about 10 years ago

  • Status changed from Ready For Testing to Closed
  • translation missing: en.field_release set to 2

Seems I put the wrong redmine number in the commit message (incorrectly #3960).

This was fixed in 0f7d219a4a65cd795eecd05117b08511d9025de2.

Actions #13

Updated by Dominic Cleal about 10 years ago

  • % Done changed from 0 to 100
Actions #14

Updated by Dominic Cleal about 10 years ago

  • Related to Bug #4315: Hosts power management API doesn't return standard error responses added
Actions

Also available in: Atom PDF