"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
import httpx
from syllable_sdk.errors import SyllableSDKError
from syllable_sdk.models import validationerror as models_validationerror
from syllable_sdk.types import BaseModel
from typing import List, Optional


class HTTPValidationErrorData(BaseModel):
    detail: Optional[List[models_validationerror.ValidationError]] = None


class HTTPValidationError(SyllableSDKError):
    data: HTTPValidationErrorData

    def __init__(
        self,
        data: HTTPValidationErrorData,
        raw_response: httpx.Response,
        body: Optional[str] = None,
    ):
        message = body or raw_response.text
        super().__init__(message, raw_response, body)
        self.data = data
