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

//# sourceMappingURL=error.js.map