Skip to main content

Overview

The MemMachineAPIError class is a custom error implementation used to represent failures returned by MemMachine client methods. It serves as the primary mechanism for catching and identifying SDK-specific issues.

Hierarchy

  • Error
    • MemMachineAPIError

Constructor

new MemMachineAPIError(message)

Initializes a new instance of the error with a specific descriptive message.

Properties


Methods

captureStackTrace()

Static
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which the method was called. This is useful for hiding implementation details of error generation from the user.

prepareStackTrace()

A static hook used to customize the formatting of stack traces.

Usage Example

Integrate MemMachineAPIError into your error handling logic to differentiate between API-specific failures and general runtime errors.
This class is defined in src/errors/memmachine-api-error.ts.