Project

General

Profile

Actions

Bug #12197

open

Better error handling when API request isn't rooted (e.g. {'minion': {"param": "value"}})

Added by Volker None about 9 years ago. Updated almost 9 years ago.

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

Description

Trying to update a minions salt_proxy_id via the REST-Api fails with

{
"error": {"message":"undefined method `delete' for nil:NilClass"}
}

The request is:
curl -k -u admin:password \
-H "Accept: version=2,application/json" \
-H "Content-Type: application/json" \
-X PUT \
-d '{ "salt_proxy_id":5 }' \
https://api.domain.de/salt/api/salt_minions/jessie-naked

This is also true for the other minion-parameters

salt_environment_id
salt_environment_name
salt_proxy_name
salt_proxy_id
salt_states

and also using python-requests + client-certificates.

Full debug trace of production.log for salt_proxy_id is attached.


Files

foreman_set_salt_proxy_id.log foreman_set_salt_proxy_id.log 16 KB Volker None, 10/16/2015 09:33 AM
update_salt_proxy_id.log update_salt_proxy_id.log 21.2 KB Volker None, 11/10/2015 08:04 AM
Actions

Also available in: Atom PDF