async function h(n,e){var a,o;let r=await fetch(n,{...e,...(e==null?void 0:e.headers)&&{headers:e.headers}});if(!r.ok){let t="An error occurred while fetching the data.";try{t=((o=(a=await r.json())==null?void 0:a.error)==null?void 0:o.message)||t}catch{}let s=new Error(t);throw s.info=t,s.status=r.status,s}return r.text()}export{h as a};
