Add dashboard to build

This commit is contained in:
jude committed 2024-02-24 16:12:34 +00:00
1 parent 53e13844f9
commit a8ef3d03f9
127 files changed
+75846 -2

No files matched your search

@@ -0,0 +1,16 @@
const REPORTER_ID = crypto.randomUUID();
window.addEventListener("error", async (ev) => {
await fetch("/report", {
method: "POST",
body: JSON.stringify({
reporterId: REPORTER_ID,
url: window.location.href,
relativeTimestamp: ev.timeStamp,
errorMessage: ev.message,
errorLine: ev.lineno,
errorFile: ev.filename,
errorType: ev.type,
}),
});
});