Custom error class for the AwSigner module. Extends the built-in Error class to include additional metadata such as error type and serialized details.

Hierarchy

  • Error
    • AwSignerError

Constructors

Properties

Methods

Constructors

  • Creates an instance of AwSignerError.

    Parameters

    • type: AwSignerErrorType

      The type of the error, as defined in AwSignerErrorType.

    • message: string

      A human-readable error message.

    • Optional details: Record<string, unknown>

      Optional additional details about the error, such as nested errors or custom properties.

    Returns AwSignerError

Properties

details?: Record<string, unknown>

Optional additional details about the error, such as nested errors or custom properties.

serializedDetails: string

A serialized string representation of the error details. This is useful for logging and debugging.

The type of the error, as defined in AwSignerErrorType.

Methods

  • Converts the error to a JSON-compatible object. This is useful for serialization and logging.

    Returns {
        details: any;
        message: string;
        name: string;
        stack: undefined | string;
        type: AwSignerErrorType;
    }

    An object containing the error's name, type, message, details, and stack trace.

    • details: any
    • message: string
    • name: string
    • stack: undefined | string
    • type: AwSignerErrorType