Base error class for Genkit errors.

Hierarchy (View Summary)

Constructors

  • Parameters

    • __namedParameters: {
          detail?: any;
          message: string;
          source?: string;
          status:
              | "CANCELLED"
              | "UNKNOWN"
              | "INVALID_ARGUMENT"
              | "DEADLINE_EXCEEDED"
              | "NOT_FOUND"
              | "ALREADY_EXISTS"
              | "PERMISSION_DENIED"
              | "UNAUTHENTICATED"
              | "RESOURCE_EXHAUSTED"
              | "FAILED_PRECONDITION"
              | "ABORTED"
              | "OUT_OF_RANGE"
              | "UNIMPLEMENTED"
              | "INTERNAL"
              | "UNAVAILABLE"
              | "DATA_LOSS";
      }

    Returns GenkitError

Properties

cause?: unknown
detail?: any
message: string
name: string
source?: string
stack?: string
status:
    | "CANCELLED"
    | "UNKNOWN"
    | "INVALID_ARGUMENT"
    | "DEADLINE_EXCEEDED"
    | "NOT_FOUND"
    | "ALREADY_EXISTS"
    | "PERMISSION_DENIED"
    | "UNAUTHENTICATED"
    | "RESOURCE_EXHAUSTED"
    | "FAILED_PRECONDITION"
    | "ABORTED"
    | "OUT_OF_RANGE"
    | "UNIMPLEMENTED"
    | "INTERNAL"
    | "UNAVAILABLE"
    | "DATA_LOSS"
prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void