import{L as s}from"./Notification-CBsCzcFI.js";const c=new Set(["Missing CSRF token","Invalid CSRF token","CSRF token expired"]);async function i(r,n){const e=await fetch(r,n);if(e.status===400){let o=null;try{o=await e.clone().json()}catch(t){console.debug("apiFetch: response body is not JSON",t)}o&&c.has(o.error)&&s.error("_common.csrf_error_desc","_common.csrf_error")}return e}export{i as a};
