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

import typing_extensions
from ..types.error_category import ErrorCategory
from ..types.error_code import ErrorCode
import typing_extensions


class ErrorParams(typing_extensions.TypedDict):
    """
    Represents an error encountered during a request to the Connect API.

    See [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information.
    """

    category: ErrorCategory
    """
    The high-level category for the error.
    See [ErrorCategory](#type-errorcategory) for possible values
    """

    code: ErrorCode
    """
    The specific code of the error.
    See [ErrorCode](#type-errorcode) for possible values
    """

    detail: typing_extensions.NotRequired[str]
    """
    A human-readable description of the error for debugging purposes.
    """

    field: typing_extensions.NotRequired[str]
    """
    The name of the field provided in the original request (if any) that
    the error pertains to.
    """
