Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

langfuse-core

Package Overview
Dependencies
Maintainers
2
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

langfuse-core - npm Package Compare versions

Comparing version
2.3.4
to
2.4.0
+5
-4
lib/index.cjs.js

@@ -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;

@@ -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)[];

@@ -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)[];

@@ -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;

{
"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