Langfuse JS/TS SDKs
    Preparing search index...

    Interface PublicApiError

    Standard error envelope for the unstable evaluators API.

    Response handling guidance:

    • Use the HTTP status code for the broad class of failure.
    • Use code for precise branching in SDKs, CLIs, or agents.
    • Inspect details for field-level validation context such as invalid filter values, malformed JSONPath expressions, or missing variable mappings.
    • Retry only after fixing the specific issue described by code and details.
    {
    * message: "Filter column \"type\" contains unsupported value(s): INVALID",
    * code: LangfuseAPI.unstable.PublicApiErrorCode.InvalidFilterValue,
    * details: {
    * field: "filter[0].value",
    * column: "type",
    * invalidValues: ["INVALID"],
    * allowedValues: ["GENERATION", "SPAN", "EVENT"]
    * }
    * }
    {
    * message: "Filter column \"datasetId\" contains dataset id(s) that do not exist in this project: dataset-prod",
    * code: LangfuseAPI.unstable.PublicApiErrorCode.InvalidFilterValue,
    * details: {
    * field: "filter[0].value",
    * column: "datasetId",
    * invalidValues: ["dataset-prod"]
    * }
    * }
    {
    * message: "No valid LLM model found for evaluator \"answer-correctness\". No default model or custom model configured for project project_123",
    * code: LangfuseAPI.unstable.PublicApiErrorCode.EvaluatorPreflightFailed,
    * details: {
    * evaluatorName: "answer-correctness",
    * provider: undefined,
    * model: undefined
    * }
    * }
    {
    * message: "Missing mappings for evaluator variable(s): output",
    * code: LangfuseAPI.unstable.PublicApiErrorCode.MissingVariableMapping,
    * details: {
    * field: "mapping",
    * variables: ["output"]
    * }
    * }
    {
    * message: "Mapping for variable \"customer_tier\" has an invalid jsonPath \"$[\". JSONPath expressions must use balanced quotes, brackets, and parentheses.",
    * code: LangfuseAPI.unstable.PublicApiErrorCode.InvalidJsonPath,
    * details: {
    * field: "mapping[0].jsonPath",
    * variable: "customer_tier",
    * value: "$["
    * }
    * }
    {
    * message: "An evaluation rule named \"answer-quality-live\" already exists in this project. Use PATCH /api/public/unstable/evaluation-rules/erule_123 to update it instead of creating a duplicate.",
    * code: LangfuseAPI.unstable.PublicApiErrorCode.NameConflict,
    * details: {
    * field: "name"
    * }
    * }
    {
    * message: "This project already has the maximum number of active evaluation rules (50). Disable an existing active evaluation rule before enabling another one.",
    * code: LangfuseAPI.unstable.PublicApiErrorCode.Conflict,
    * details: {
    * limit: 50
    * }
    * }
    {
    * message: "Rate limit exceeded",
    * code: LangfuseAPI.unstable.PublicApiErrorCode.RateLimited,
    * details: {
    * retryAfterSeconds: 60,
    * limit: 1000,
    * remaining: 0,
    * resetAt: "2026-03-30T10:00:00.000Z"
    * }
    * }
    interface PublicApiError {
        code: unstable.PublicApiErrorCode;
        details?: unstable.PublicApiErrorDetails;
        message: string;
    }
    Index

    Properties

    Properties

    Stable machine-readable error code.

    Optional structured error context. Inspect the populated fields based on code.

    message: string

    Human-readable description of the failure.