UNPKG

@arizeai/phoenix-client

Version:
19 lines 502 B
export function formatApiError(error) { if (typeof error === "string") { return error; } if (error && typeof error === "object") { const errorWithDetail = error; if (typeof errorWithDetail.detail === "string") { return errorWithDetail.detail; } try { return JSON.stringify(error); } catch { return String(error); } } return String(error); } //# sourceMappingURL=apiErrorUtils.js.map