Description of problem: The API will return a 200 status code when a user attempts to assign a tag from a category that does not exist. This should get a 400 response. In my specific case, I was calling "/api/vms/#{vm_id}/tags" with a body of: {"action":"assign","resources":[{"category":"team","name":"it_pnp"}]} but the category "team" did not exist. This should generate a 400 since the parameters of the request were not valid, but cloudforms returned a 200. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
https://github.com/ManageIQ/manageiq-api/pull/843
PR: https://github.com/ManageIQ/manageiq/pull/20197
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/3a56e0e1f19e66fdc9fa65724c4b02d3e2438efb commit 3a56e0e1f19e66fdc9fa65724c4b02d3e2438efb Author: Yuri Rudman <yrudman> AuthorDate: Thu May 21 19:08:46 2020 +0000 Commit: Yuri Rudman <yrudman> CommitDate: Thu May 21 19:08:46 2020 +0000 specify what is missing if tag assignment failed Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1792106 app/models/classification.rb | 12 +- 1 file changed, 8 insertions(+), 4 deletions(-)
PR: https://github.com/ManageIQ/manageiq/pull/20216
New commit detected on ManageIQ/manageiq-api/master: https://github.com/ManageIQ/manageiq-api/commit/e9e4001515cf1912a1deb8e9fcf464400e46a3da commit e9e4001515cf1912a1deb8e9fcf464400e46a3da Author: Yuri Rudman <yrudman> AuthorDate: Thu May 21 19:27:45 2020 +0000 Commit: Yuri Rudman <yrudman> CommitDate: Thu Jun 18 19:39:19 2020 +0000 specify what is missing if tag assignment failed Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1792106 app/controllers/api/subcollections/tags.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
second PR: https://github.com/ManageIQ/manageiq-api/pull/843