Ensure Warlock passes the approperiate error message along with it's exceptions.
Change-Id: I966555181ab63ae50cadfd61ac38abda51f46350
This commit is contained in:
@@ -72,8 +72,8 @@ def model_factory(schema):
|
|||||||
mutation[key] = value
|
mutation[key] = value
|
||||||
try:
|
try:
|
||||||
self.validator(mutation)
|
self.validator(mutation)
|
||||||
except ValidationError:
|
except ValidationError, e:
|
||||||
raise InvalidOperation()
|
raise InvalidOperation(str(e))
|
||||||
|
|
||||||
dict.__setitem__(self, key, value)
|
dict.__setitem__(self, key, value)
|
||||||
|
|
||||||
@@ -103,8 +103,8 @@ def model_factory(schema):
|
|||||||
mutation.update(other)
|
mutation.update(other)
|
||||||
try:
|
try:
|
||||||
self.validator(mutation)
|
self.validator(mutation)
|
||||||
except ValidationError:
|
except ValidationError, e:
|
||||||
raise InvalidOperation()
|
raise InvalidOperation(str(e))
|
||||||
dict.update(self, other)
|
dict.update(self, other)
|
||||||
|
|
||||||
def iteritems(self):
|
def iteritems(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user