import { isErrorLike as s, tryDo as g } from "@milaboratories/helpers";
function f(...n) {
  for (let t = 0; t < n.length; t++) {
    const i = n[t], e = o(i);
    if (e !== void 0) return e;
  }
}
function o(n) {
  if (typeof n == "string")
    return n;
  if (s(n) && n.message.length > 0)
    return n.message;
  if (n != null)
    return `Unknown error message:
${g(() => JSON.stringify(n, null, 4), () => String(n))}`;
}
export {
  f as getErrorMessage
};
//# sourceMappingURL=error.js.map
