feat(sentry): drop events which have frappe.throw (#23886)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
3015852ce1
commit
91dce0b007
1 changed files with 11 additions and 0 deletions
|
|
@ -9,4 +9,15 @@ Sentry.init({
|
|||
user: { id: frappe.boot.user.name ?? "Unidentified" },
|
||||
tags: { site: frappe.boot.sitename },
|
||||
},
|
||||
beforeSend(event, hint) {
|
||||
// Check if it was caused by frappe.throw()
|
||||
if (
|
||||
hint.originalException instanceof Error &&
|
||||
hint.originalException.stack &&
|
||||
hint.originalException.stack.includes("frappe.throw")
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
return event;
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue