@dxos/react-client
    Preparing search index...

    Class ApiError

    User facing API Errors. E.g., something was misconfigured.

    Hierarchy

    • ApiError_base
      • ApiError
    Index

    Constructors

    • Parameters

      • Optionaloptions: BaseErrorOptions

      Returns ApiError

    Properties

    _tag: "API"
    cause?: unknown
    code: "API"
    context: Record<string, unknown>
    message: string
    name: "API"
    stack?: string
    code: "API"
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any
    stackTraceLimit: number

    Methods

    • Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    • Type Parameters

      • Code extends string = string

      Parameters

      • code: Code
      • Optionalmessage: string

      Returns any

    • Parameters

      • error: unknown

      Returns error is BaseError<string>

    • Parameters

      • error: unknown

      Returns error is Error

    • Parameters

      • Optionaloptions: Omit<BaseErrorOptions, "cause"> & { ifTypeDiffers?: boolean }

      Returns (
          error: unknown,
      ) => {
          _tag: "API";
          cause?: unknown;
          code: "API";
          context: Record<string, unknown>;
          message: string;
          name: "API";
          stack?: string;
      }