Is the onbeforeunload event soon enough to fire a request if the interval hasn't fired yet?
If it's not, store to localStorage and send next time the page is loaded. How long before you invalidate an error? Revisit the site/page after 7 days and the error is no longer relevant? Drop it?