I´m using "@pnp/sp": "^3.0.3", I have this code
const sp = spfi().using(SPFx(props.context));
const item = {
Title: mail,
URL: { Url: url.trim(), Description: name.trim() },
};
await sp.web.lists.getById(props.list).items.add(item);
It works, I can find the item in the list. It´s added.
If I have the page open 30 minutes and insert a new item it fails with this error
Error: Error making HttpClient request in queryable [403] ::> {"odata.error":{"code":"-2130575252, Microsoft.SharePoint.SPException","message":{"lang":"en-US","value":"The security validation for this page is invalid and might be corrupted. Please use your web browser's Back button to try your operation again."}}}