UNPKG

@arizeai/phoenix-client

Version:
22 lines 618 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatApiError = formatApiError; 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 (_a) { return String(error); } } return String(error); } //# sourceMappingURL=apiErrorUtils.js.map