Error handling: Model-level validations, proper error responses. (added coverage for new instance status call)
This commit is contained in:
parent
5c46898b17
commit
9938995e05
2 changed files with 11 additions and 0 deletions
|
|
@ -219,6 +219,10 @@ class InstanceBackend(object):
|
|||
if instance.id in instance_ids:
|
||||
result.append(instance)
|
||||
|
||||
# TODO: Trim error message down to specific invalid id.
|
||||
if instance_ids and len(instance_ids) > len(result):
|
||||
raise InvalidInstanceIdError(instance_ids)
|
||||
|
||||
return result
|
||||
|
||||
def get_instance_by_id(self, instance_id):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue