Project

General

Profile

Actions

Bug #4266

closed

Host API doesn't give reasonable response when sending ids of non-existing environments

Added by Tomáš Strachota about 10 years ago. Updated almost 3 years ago.

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

Description

API responses 200 when updating hosts with environment_id that does not exist. It should rather respond with 404 to indicate that the desired operation was unsuccessful.

I reproduced that with hosts but I suspect it can be cross API issue.


Related issues 1 (0 open1 closed)

Related to Hammer CLI - Bug #3729: Hammer doesn't give reasonable output when using names instead of id numbers while updating hosts.Closed11/22/2013Actions
Actions #1

Updated by Tomáš Strachota about 10 years ago

  • Related to Bug #3729: Hammer doesn't give reasonable output when using names instead of id numbers while updating hosts. added
Actions #2

Updated by Leos Stejskal almost 3 years ago

  • Status changed from New to Closed

Closing the issue, works in the latest version.

Hammer:

Could not update the host:
  Environment with id 1123 doesn't exist or is not assigned to proper organization and/or location

JSON:

{
  "error": {
    "id": 1,
    "errors": {
      "environment_id": [
        "with id 23 doesn't exist or is not assigned to proper organization and/or location" 
      ]
    },
    "full_messages": [
      "Environment with id 23 doesn't exist or is not assigned to proper organization and/or location" 
    ]
  }
}

Actions

Also available in: Atom PDF