# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .error_errors_item import ErrorErrorsItem


class Error(UncheckedBaseModel):
    """
    The API will return an Error List for a failed request, which will contain one or more Error objects.
    """

    type: typing.Literal["error.list"] = pydantic.Field(default="error.list")
    """
    The type is error.list
    """

    request_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    
    """

    errors: typing.List[ErrorErrorsItem] = pydantic.Field()
    """
    An array of one or more error objects
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
