Skip to content

[BUG] Langfuseexporter fails on json response #670

@Alex793x

Description

@Alex793x

Describe the bug

When running with langfuse exporter, we suddenly started experiencing following error in the voltagent debug logs:

[Langfuse SDK] Unknown error: 1738 | } catch (e) { 1739 | // fetch will only throw on network errors or on timeouts 1740 | throw new LangfuseFetchNetworkError(e); 1741 | } 1742 | if (res.status < 200 || res.status >= 400) { 1743 | const body = await res.json(); ^ SyntaxError: Failed to parse JSON at <anonymous> (/Users/alexthh/School/syncable-dev-rwii/fc-agent-voltagent/node_modules/langfuse-core/lib/index.mjs:1743:32)

Steps To Reproduce

  1. setup langfuse exporter with public key and secret key
  2. Setup a supervisor pattern or any agentic patterns/workflows
  3. error should appear in-between tools utilization

Expected behavior

Expect to see tracing within the langfuse dashboard, but it never hits and we don't get any auth errors but json response errors

Packages

"@voltagent/core": "^1.1.23",
"@voltagent/langfuse-exporter": "^1.1.2",
"@voltagent/libsql": "^1.0.7",
"@voltagent/logger": "^1.0.2",
"@voltagent/server-hono": "1.0.15",
"@voltagent/vercel-ai": "^1.0.0",

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions