Skip to content

Commit eeea2a9

Browse files
committed
tweaks to javascript error logging, refs #4487
Change-Id: I065a9c637456d3bffef083c16ca4a0d1be75ec8d Reviewed-on: https://gerrit.instructure.com/3600 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Zach Wily <zach@instructure.com>
1 parent 3bea051 commit eeea2a9

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

app/controllers/info_controller.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,10 @@ def record_error
106106
end
107107

108108
def record_js_error
109-
params[:error] ||= {}
110-
params[:error][:category] = 'javascript'
111-
record_error
109+
error = params[:error]
110+
error[:backtrace] = error[:url]
111+
ErrorReport.log_error('javascript', error)
112+
render :nothing => true
112113
end
113114

114115
def health_check

public/javascripts/ajax_errors.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ INST.log_error = function(params) {
2727
var txt = "?";
2828
params.url = params.url || location.href;
2929
params.platform = params.platform || navigator.platform;
30+
params.action = params.action || location.href;
3031
params.user_name = username;
3132
for(var idx in params) {
3233
txt = txt + 'error[' + idx + "]=" + escape(params[idx]) + "&";

0 commit comments

Comments
 (0)