Error handling: Model-level validations, proper error responses.

This commit is contained in:
Shawn Falkner-Horine 2014-08-25 10:54:47 -07:00
commit 071c03e216
25 changed files with 616 additions and 287 deletions

View file

@ -10,11 +10,8 @@ class General(BaseResponse):
self.instance_ids = instance_ids_from_querystring(self.querystring)
instance_id = self.instance_ids[0]
instance = ec2_backend.get_instance(instance_id)
if instance:
template = Template(GET_CONSOLE_OUTPUT_RESULT)
return template.render(instance=instance)
else:
return "", dict(status=404)
template = Template(GET_CONSOLE_OUTPUT_RESULT)
return template.render(instance=instance)
GET_CONSOLE_OUTPUT_RESULT = '''