Bug 766884 - exception being improperly caught from bad configs post
Summary: exception being improperly caught from bad configs post
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-configserver
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
Assignee: Dan Radez
QA Contact: dgao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-12 18:49 UTC by Dan Radez
Modified: 2012-08-30 17:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-30 17:13:20 UTC


Attachments (Terms of Use)

Description Dan Radez 2011-12-12 18:49:06 UTC
Description of problem:
When a bad config is posted to configserver ConfigServer::Model::InvalidInstanceConfigError is raised, but the code is trying to catch ConfigServer::InvalidInstanceConfigError

Instead of returning a 400 as the code suggests should happen, a stack is thrown.

Unit Test:
Config Server should return 400 from post /configs/:version/:uuid
Failure/Error: post '/configs/1/aFailUUID', {:data=>'Not Real Data'}
ConfigServer::Model::InvalidInstanceConfigError:

Version-Release number of selected component (if applicable):
04.x

How reproducible:
this fails everytime I run the test

Steps to Reproduce:
1. post bad data to /configs/1/aFailUUID
2.
3.
  
Actual results:
stack

Expected results:
http 400

Additional info:

Comment 2 dgao 2012-01-18 23:24:22 UTC
  <instance-config bad_id='585500025950546337488934' bad_name='Test_Instance_1' open_secret='4arN1BIwBoLZyKLXBpnReSTqBO1dyZ7nZcwsye3KVBoNShpn'>
     <deployable name='' id='test_instance_uuid_1' />
     <services>
       <service name='proxy'>
         <executable url='http://www.aeolusproject.org/redmine/attachments/download/169/start_simple.sh' />
         <files>  
           <file url='http://example.com/path/to/proxy_conf_file_2' />
           <file url='http://example.com/path/to/proxy_conf_file_2' />
         </files> 
         <parameters>
           <parameter name='foo'>
             <value>bar</value>
           </parameter>
         </parameters>
       </service>
     </services>
   </instance-config> 


Receiving response: HTTP/1.1 400 Bad Request


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