mirror of
https://github.com/zulip/zulip.git
synced 2026-07-15 21:03:26 +08:00
blueslip: Send the user agent string back with the error report
(imported from commit ed77877465b1497cd3d78753c3398329302075ff)
This commit is contained in:
parent
53a68144e0
commit
b08dbdfe48
@ -30,7 +30,8 @@ function report_error(msg, stack, opts) {
|
||||
type: 'POST',
|
||||
url: '/json/report_error',
|
||||
dataType: 'json',
|
||||
data: { message: msg, stacktrace: stack },
|
||||
data: { message: msg, stacktrace: stack,
|
||||
user_agent: window.navigator.userAgent},
|
||||
timeout: 3*1000,
|
||||
success: function () {
|
||||
reported_errors[key] = true;
|
||||
|
||||
@ -1442,7 +1442,9 @@ def json_get_active_statuses(request, user_profile):
|
||||
|
||||
@authenticated_json_post_view
|
||||
@has_request_variables
|
||||
def json_report_error(request, user_profile, message=POST, stacktrace=POST):
|
||||
def json_report_error(request, user_profile, message=POST, stacktrace=POST,
|
||||
user_agent=POST):
|
||||
mail_admins("Browser error for %s" % (user_profile.user.email,),
|
||||
"Message:\n%s\n\nStacktrace:\n%s" % (message, stacktrace))
|
||||
"Message:\n%s\n\nStacktrace:\n%s\n\nUser agent:\n%s"
|
||||
% (message, stacktrace, user_agent))
|
||||
return json_success()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user