feat(sentry): log request json body / form data
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
b71d01e1b4
commit
da8e88e66c
1 changed files with 4 additions and 0 deletions
|
|
@ -116,6 +116,10 @@ def capture_exception(message: str | None = None) -> None:
|
|||
set_scope(scope)
|
||||
evt_processor = _make_wsgi_event_processor(frappe.request.environ, False)
|
||||
scope.add_event_processor(evt_processor)
|
||||
if frappe.request.is_json:
|
||||
scope.set_context("JSON Body", frappe.request.json)
|
||||
elif frappe.request.form:
|
||||
scope.set_context("Form Data", frappe.request.form)
|
||||
|
||||
if client := hub.client:
|
||||
exc_info = sys.exc_info()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue