opencode-feishu 0.7.11 → 0.7.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -99239,12 +99239,14 @@ function extractErrorFields(error) {
99239
99239
  if (typeof error === "string") return [error];
99240
99240
  if (error && typeof error === "object") {
99241
99241
  const e = error;
99242
- const fields = [e.type, e.name, e.message].filter(Boolean).map(String);
99242
+ const explicit = [e.message, e.type, e.name];
99243
+ const enumerable = Object.values(e);
99244
+ const fields = [...explicit, ...enumerable].filter((v) => typeof v === "string" && v.length > 0);
99243
99245
  if (e.data && typeof e.data === "object" && "message" in e.data) {
99244
99246
  const dataMsg = e.data.message;
99245
- if (dataMsg) fields.push(String(dataMsg));
99247
+ if (typeof dataMsg === "string" && dataMsg.length > 0) fields.push(dataMsg);
99246
99248
  }
99247
- return fields;
99249
+ return [...new Set(fields)];
99248
99250
  }
99249
99251
  return [String(error)];
99250
99252
  }
@@ -99499,6 +99501,13 @@ async function handleChat(ctx, deps) {
99499
99501
  }
99500
99502
  }
99501
99503
  }
99504
+ if (sessionError) {
99505
+ log("info", "\u9519\u8BEF\u5B57\u6BB5\u68C0\u67E5", {
99506
+ sessionKey,
99507
+ fields: sessionError.fields,
99508
+ isModel: isModelError(sessionError.fields)
99509
+ });
99510
+ }
99502
99511
  if (sessionError && isModelError(sessionError.fields)) {
99503
99512
  const attempts = getRetryAttempts(sessionKey);
99504
99513
  if (attempts < MAX_RETRY_ATTEMPTS) {