@squidcloud/client
    Preparing search index...

    Class SquidClientError<BodyType>

    Represents an error thrown during an RPC (Remote Procedure Call) made by the Squid SDK.

    This error contains detailed HTTP-level information such as the status code, response body, headers, and the request URL, allowing for better debugging and error handling in client code.

    Type Parameters

    • BodyType = unknown

    Hierarchy

    • Error
      • SquidClientError
    Index

    Constructors

    Properties

    Constructors

    • Creates a new SquidClientError instance.

      Type Parameters

      • BodyType = unknown

      Parameters

      • message: string

        A custom error message.

      • statusCode: number

        The HTTP status code returned by the server (e.g., 400, 403, 422).

      • Optionalurl: string

        The URL that was called when the error occurred.

      • Optionalheaders: Record<string, string>

        The HTTP response headers.

      • Optionalbody: BodyType

        The parsed body of the error response.

      Returns SquidClientError<BodyType>

    Properties

    body?: BodyType

    The parsed body of the error response.

    headers?: Record<string, string>

    The HTTP response headers.

    statusCode: number

    The HTTP status code returned by the server (e.g., 400, 403, 422).

    url?: string

    The URL that was called when the error occurred.