@arizeai/phoenix-client
Version:
A client for the Phoenix API
22 lines • 618 B
JavaScript
;
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