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