langfuse-core
Advanced tools
+5
-4
@@ -164,4 +164,4 @@ 'use strict'; | ||
| class LangfuseFetchHttpError extends Error { | ||
| constructor(response) { | ||
| super("HTTP error while fetching Langfuse: " + response.status); | ||
| constructor(response, body) { | ||
| super("HTTP error while fetching Langfuse: " + response.status + " and body: " + body); | ||
| this.response = response; | ||
@@ -509,7 +509,8 @@ this.name = "LangfuseFetchHttpError"; | ||
| if (res.status < 200 || res.status >= 400) { | ||
| throw new LangfuseFetchHttpError(res); | ||
| const body = await res.json(); | ||
| throw new LangfuseFetchHttpError(res, JSON.stringify(body)); | ||
| } | ||
| const returnBody = await res.json(); | ||
| if (res.status === 207 && returnBody.errors.length > 0) { | ||
| throw new LangfuseFetchHttpError(res); | ||
| throw new LangfuseFetchHttpError(res, JSON.stringify(returnBody.errors)); | ||
| } | ||
@@ -516,0 +517,0 @@ return res; |
+13
-1
@@ -155,2 +155,8 @@ /// <reference types="node" /> | ||
| unit?: components["schemas"]["ModelUsageUnit"]; | ||
| /** Format: double */ | ||
| inputCost?: number | null; | ||
| /** Format: double */ | ||
| outputCost?: number | null; | ||
| /** Format: double */ | ||
| totalCost?: number | null; | ||
| }; | ||
@@ -524,2 +530,6 @@ /** Score */ | ||
| }; | ||
| /** Sort */ | ||
| Sort: { | ||
| id: string; | ||
| }; | ||
| /** utilsMetaResponse */ | ||
@@ -1237,3 +1247,3 @@ utilsMetaResponse: { | ||
| parameters: { | ||
| query?: { | ||
| query: { | ||
| page?: number | null; | ||
@@ -1243,2 +1253,4 @@ limit?: number | null; | ||
| name?: string | null; | ||
| /** @description Format of the string sort_by=timestamp.asc (id, timestamp, name, userId, release, version, public, bookmarked, sessionId) */ | ||
| orderBy: string; | ||
| /** @description Only traces that include all of these tags will be returned. */ | ||
@@ -1245,0 +1257,0 @@ tags?: (string | null)[]; |
+13
-1
@@ -155,2 +155,8 @@ /// <reference types="node" /> | ||
| unit?: components["schemas"]["ModelUsageUnit"]; | ||
| /** Format: double */ | ||
| inputCost?: number | null; | ||
| /** Format: double */ | ||
| outputCost?: number | null; | ||
| /** Format: double */ | ||
| totalCost?: number | null; | ||
| }; | ||
@@ -524,2 +530,6 @@ /** Score */ | ||
| }; | ||
| /** Sort */ | ||
| Sort: { | ||
| id: string; | ||
| }; | ||
| /** utilsMetaResponse */ | ||
@@ -1237,3 +1247,3 @@ utilsMetaResponse: { | ||
| parameters: { | ||
| query?: { | ||
| query: { | ||
| page?: number | null; | ||
@@ -1243,2 +1253,4 @@ limit?: number | null; | ||
| name?: string | null; | ||
| /** @description Format of the string sort_by=timestamp.asc (id, timestamp, name, userId, release, version, public, bookmarked, sessionId) */ | ||
| orderBy: string; | ||
| /** @description Only traces that include all of these tags will be returned. */ | ||
@@ -1245,0 +1257,0 @@ tags?: (string | null)[]; |
+5
-4
@@ -162,4 +162,4 @@ import mustache from 'mustache'; | ||
| class LangfuseFetchHttpError extends Error { | ||
| constructor(response) { | ||
| super("HTTP error while fetching Langfuse: " + response.status); | ||
| constructor(response, body) { | ||
| super("HTTP error while fetching Langfuse: " + response.status + " and body: " + body); | ||
| this.response = response; | ||
@@ -507,7 +507,8 @@ this.name = "LangfuseFetchHttpError"; | ||
| if (res.status < 200 || res.status >= 400) { | ||
| throw new LangfuseFetchHttpError(res); | ||
| const body = await res.json(); | ||
| throw new LangfuseFetchHttpError(res, JSON.stringify(body)); | ||
| } | ||
| const returnBody = await res.json(); | ||
| if (res.status === 207 && returnBody.errors.length > 0) { | ||
| throw new LangfuseFetchHttpError(res); | ||
| throw new LangfuseFetchHttpError(res, JSON.stringify(returnBody.errors)); | ||
| } | ||
@@ -514,0 +515,0 @@ return res; |
+2
-2
| { | ||
| "name": "langfuse-core", | ||
| "version": "2.3.4", | ||
| "version": "2.4.0", | ||
| "engines": { | ||
@@ -40,3 +40,3 @@ "node": ">=18" | ||
| }, | ||
| "gitHead": "0c3ea9a10820918c523df9c53a6f37c0ccc04db4" | ||
| "gitHead": "dcf054d0ab9236026bca192604279e0c5301e4bb" | ||
| } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
283383
0.71%3147
0.45%