Parameter value deserialization error handling

This commit is contained in:
Artur Maciag 2018-08-03 16:32:24 +01:00
parent d4ada7bcbb
commit 95204cba61

View file

@ -108,7 +108,10 @@ class Parameter(object):
if not self.schema:
return value
deserialized = self.deserialize(value)
try:
deserialized = self.deserialize(value)
except ValueError as exc:
raise InvalidParameterValue(str(exc))
try:
return self.schema.unmarshal(deserialized)