Error handling: Model-level validations, proper error responses.
This commit is contained in:
parent
b94401247f
commit
071c03e216
25 changed files with 616 additions and 287 deletions
|
|
@ -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 = '''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue