Files
cfw-autumn/others/python-sdk/src/autumn_sdk/errors/responsevalidationerror.py
2026-02-16 17:45:45 +00:00

28 lines
752 B
Python

"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
import httpx
from typing import Optional
from dataclasses import dataclass
from autumn_sdk.errors import AutumnError
@dataclass(unsafe_hash=True)
class ResponseValidationError(AutumnError):
"""Error raised when there is a type mismatch between the response data and the expected Pydantic model."""
def __init__(
self,
message: str,
raw_response: httpx.Response,
cause: Exception,
body: Optional[str] = None,
):
message = f"{message}: {cause}"
super().__init__(message, raw_response, body)
@property
def cause(self):
"""Normally the Pydantic ValidationError"""
return self.__cause__