Actions
Bug #4266
closedHost API doesn't give reasonable response when sending ids of non-existing environments
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
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.
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
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