MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / extractGeminiOperationError

Function extractGeminiOperationError

ai/ai.ts:2290–2301  ·  view source on GitHub ↗
(data: any)

Source from the content-addressed store, hash-verified

2288
2289const extractGeminiOperationError = (data: any): string => {
2290 const err = data?.error || data?.data?.error;
2291 if (!err) return "";
2292 if (typeof err === "string") return err;
2293 if (typeof err.message === "string") return err.message;
2294 if (typeof err.status === "string") return err.status;
2295 if (Array.isArray(err.details) && err.details.length > 0) {
2296 const detail = err.details[0];
2297 if (typeof detail?.message === "string") return detail.message;
2298 }
2299 return "视频生成失败";
2300};
2301
2302const extractGeminiVideoResult = (
2303 data: any,
2304): { uri?: string; bytes?: string } | null => {

Callers 1

generateGeminiVideoMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected