Base error class for Genkit errors.

Hierarchy (View Summary)

Constructors

  • Parameters

    • response: GenerateResponse<any>
    • message: string
    • Optionalstatus:
          | "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"
    • Optionaldetail: Record<string, any>

    Returns GenerationResponseError

Properties

cause?: unknown
detail: { response: GenerateResponse<unknown>; [otherDetails: string]: 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