Description of problem: When trying to create an app based on an invalid initial Git url the REST API will return a Hash where the field name attribute is expected. This is likely to happen in other REST API calls too. Example response body: { "data": null, "errors": {}, "messages": [ { "exit_code": 130, "field": { "appInfoIO": [], "cart_commands": [], "data": "", "debugIO": [], "errorIO": [], "exitcode": 130, "hasUserActionableError": true, "messageIO": [], "properties": {}, "resultIO": [] }, "severity": "error", "text": "Source Code repository URL type must be one of: git:// http:// https:// file:// ftp:// ftps:// rsync://\n" } ], "status": "unprocessable_entity", "supported_api_versions": [ 1.0, 1.1, 1.2, 1.3, 1.4 ], "type": null, "version": "1.4" } Version-Release number of selected component (if applicable): production How reproducible: always Steps to Reproduce: 1. curl -X POST -k --user "user:pass" https://openshift.redhat.com/broker/rest/domains/mydomain/applications -d "name=foo&cartridge=php-5.3&initial_git_url=bar" | python -mjson.tool Actual results: message body with invalid "field" attribute in the JSON. Expected results: the "field" attribute must return the field name involved in the error (in this case specifically 'git_initial_url'). Additional info:
https://github.com/openshift/origin-server/pull/2519
(In reply to comment #1) > https://github.com/openshift/origin-server/pull/2519 Seems above pull request is for stage only, but seems no pull request for master, and related code is not merged in devenv_3238.
As comment2, I still can't find the code merged into the latest build devenv_3247
https://github.com/openshift/origin-server/pull/2499
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/6442c3b3eda7295e994ba31744f2bc4ea666a3a5 Bug 963828
Verified on 3251 --PASS [qgong@dhcp-8-154 dev]$ curl -X POST -k --user "qgong:pass" https://ec2-54-224-81-227.compute-1.amazonaws.com/broker/rest/domains/qgong4/applications -d "name=foo&cartridge=php-5.3&initial_git_url=bar" | python -mjson.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 143 241 120 241 0 46 174 33 0:00:01 0:00:01 --:--:-- 596 { "data": null, "errors": {}, "messages": [ { "exit_code": 216, "field": "initial_git_url", "severity": "error", "text": "Invalid initial git URL" } ], "status": "unprocessable_entity", "supported_api_versions": [ 1.0, 1.1, 1.2, 1.3, 1.4 ], "type": null, "version": "1.4"