Bug 1792106 - [RFE] RFE to improve returned message to have word "failed" in the text and explicitly say that category or tag is missing
Summary: [RFE] RFE to improve returned message to have word "failed" in the text and e...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: GA
: 5.11.7
Assignee: Yuri Rudman
QA Contact: Parthvi Vala
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1822318
TreeView+ depends on / blocked
 
Reported: 2020-01-17 03:40 UTC by Saif Ali
Modified: 2023-10-06 19:01 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-01 20:01:24 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Saif Ali 2020-01-17 03:40:10 UTC
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:

Comment 4 Yuri Rudman 2020-05-21 20:07:53 UTC
PR: https://github.com/ManageIQ/manageiq/pull/20197

Comment 5 CFME Bot 2020-05-26 21:05:25 UTC
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(-)

Comment 7 Yuri Rudman 2020-06-05 16:03:55 UTC
PR: https://github.com/ManageIQ/manageiq/pull/20216

Comment 9 CFME Bot 2020-06-19 19:31:28 UTC
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(-)

Comment 10 Yuri Rudman 2020-06-19 21:07:23 UTC
second PR: https://github.com/ManageIQ/manageiq-api/pull/843


Note You need to log in before you can comment on or make changes to this bug.