import { Y as i } from "./index-CeEMms9z.js";
function a(e) {
  if (e instanceof i && e.details)
    if (Array.isArray(e.details)) {
      if (e.details.length > 0) return e.details.join(" ");
    } else {
      const s = [];
      for (const t of Object.values(e.details))
        Array.isArray(t) ? s.push(...t) : typeof t == "string" && s.push(t);
      if (s.length > 0) return s.join(" ");
    }
  return e instanceof Error ? e.message : typeof e == "string" ? e : "An unexpected error occurred";
}
export {
  a as e
};
//# sourceMappingURL=extractErrorMessage-C0uxTGn5.js.map
