1
0
Fork 0
mirror of https://github.com/correl/openapi-core.git synced 2025-04-05 17:00:11 -09:00
openapi-core/openapi_core/casting/schemas/exceptions.py
2020-01-23 22:48:34 +00:00

14 lines
334 B
Python

import attr
from openapi_core.exceptions import OpenAPIError
@attr.s(hash=True)
class CastError(OpenAPIError):
"""Schema cast operation error"""
value = attr.ib()
type = attr.ib()
def __str__(self):
return "Failed to cast value {value} to type {type}".format(
value=self.value, type=self.type)