import{ak as h}from"./Cx8pZeM5.js";async function m(w,r,a){var e,s;try{const t=await w;return await(r==null?void 0:r(t)),{data:t,errors:null}}catch(t){if(!(t instanceof h)||((e=t.response)==null?void 0:e.status)!==400)throw t;const f=((s=t.data)==null?void 0:s.errors)||{};return await(a==null?void 0:a(f)),{data:null,errors:f}}}export{m as s};