function e(e){return typeof e==`object`&&!!e}function t(e){return typeof e==`string`&&e.trim()?e:void 0}function n(n){if(e(n)){let r=n.data;if(typeof r==`string`&&r.trim())return r;if(e(r)){let n=r.data;if(e(n)){let e=t(n.error)??t(n.message);if(e)return e}let i=t(r.error)??t(r.statusMessage)??t(r.message);if(i)return i}}return n instanceof Error?n.message:String(n)}export{n as t};