Hide Forgot
Description of problem: Caught "NoMethodError in DomainsController#update " error when adding invalid domain name. Version-Release number of selected component (if applicable): devenv_1628 rhc-site-0.87.2-1.git.129.a444ddf.el6.noarch How reproducible:always Steps to Reproduce: 1.Go to Openshift website and login 2.Go to app/console/applications page 3.Add an invalid domain like "dddd@@@" Actual results: Caught "NoMethodError in DomainsController#update " error when adding invalid domain name. NoMethodError in DomainsController#update You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.each Rails.root: /var/www/libra/site Application Trace | Framework Trace | Full Trace app/models/rest_api/base.rb:306:in `load_remote_errors' app/models/rest_api/base.rb:146:in `save' app/controllers/domains_controller.rb:23:in `update' Request Parameters: {"commit"=>"Save", "utf8"=>"✓", "domain"=>{"name"=>"bbbbbbbbb@@@@"}, "authenticity_token"=>"TzuWt8EJpqXrLMYmlcrg1Bi0Q43s5O7daYWcscZkfw0=", "_method"=>"put"} Expected results: Error message should be displayed. Additional info:
This issue also happens when adding long domain name.
Server is not sending a well formed error body with messages (no body is sent). Should be fixed when US1895 is fixed. Started PUT "/broker/rest/domains/domain23.json" for 127.0.0.1 at Wed Feb 22 11:03:05 -0500 2012 Processing by DomainsController#update as JSON Parameters: {"namespace"=>"domain23@@@@", "id"=>"domain23"} Completed 422 Unprocessable Entity in 29ms (Views: 6.0ms) Unable to read server response, #<Net::HTTPClientError 422 Unprocessable Entity readbody=true> Body: "{}" Completed 500 Internal Server Error in 521ms
I'm not seeing this anymore. Error handling works except for duplicate domains which is covered in Bug #797971
Verify this bug on devenv_1649,it is fixed now.