| Summary: | Met "can't convert Message into Array" when trying to add user with illegal role to a domain | ||
|---|---|---|---|
| Product: | OpenShift Online | Reporter: | Meng Bo <bmeng> |
| Component: | Master | Assignee: | Lili Nader <lnader> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 2.x | CC: | mfisher |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-01-24 03:25:36 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/bb3a21462516856bffe0634682151361e410bf7e Bug 1021371 Checked on devenv_3932, issue has been fixed.
<messages>
<message>
<severity>error</severity>
<text>You must provide a role for each member - you can add or update (with 'view', 'edit', 'admin') or remove (with 'none').</text>
<exit-code>1</exit-code>
<field>role</field>
<index>0</index>
</message>
</messages>
|
Description of problem: Add user with non-exist role to a domain via rest api will get following error: <messages> <message> <severity>error</severity> <text>Unable to complete the requested operation due to: can't convert Message into Array. Reference ID: 45eb59c7492b3a1933e9128bd3f07e2f</text> <exit-code>1</exit-code> <field nil="true"></field> <index nil="true"></index> </message> </messages> Version-Release number of selected component (if applicable): devenv_3921 How reproducible: always Steps to Reproduce: 1. Create domain with one login 2. Try to add another account to the domain with illegal role via rest api # curl -k -H 'Accept: application/xml' --user bmeng:123123 https://localhost/broker/rest/domain/bmengdev/members -XPATCH -d login=bmeng1 -d role=test 3. Actual results: <text>Unable to complete the requested operation due to: can't convert Message into Array. Reference ID: 45eb59c7492b3a1933e9128bd3f07e2f</text> Expected results: Should return the meaningful error message. Additional info: It is ok when using rhc: $ rhc member-add bmeng3 -n bmengdev -r test invalid option: -r The provided role 'test' is not valid. Supported values: view, edit, admin