mirror of
https://github.com/correl/openapi-core.git
synced 2024-12-01 11:09:57 +00:00
15 lines
334 B
Python
15 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)
|