diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-15 14:29:46 +0300 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-15 14:34:13 +0300 |
commit | 86b4f49c8c76a322d2f12f61e5a2d27d3c5c4671 (patch) | |
tree | 3c4a65f14ad81b80e8cd62d3df47d0eae19562d2 /app/assets/javascripts | |
parent | 69e49a095ded719ccfb1287b6100646663de3f03 (diff) |
Removed rewire and fixed tests
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/raven/raven_config.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/raven/raven_config.js b/app/assets/javascripts/raven/raven_config.js index bb9be7cb196..9c756a4130b 100644 --- a/app/assets/javascripts/raven/raven_config.js +++ b/app/assets/javascripts/raven/raven_config.js @@ -1,5 +1,4 @@ import Raven from 'raven-js'; -import $ from 'jquery'; const RavenConfig = { init(options = {}) { @@ -24,11 +23,12 @@ const RavenConfig = { }, bindRavenErrors() { - $(document).on('ajaxError.raven', this.handleRavenErrors); + window.$(document).on('ajaxError.raven', this.handleRavenErrors); }, handleRavenErrors(event, req, config, err) { const error = err || req.statusText; + const responseText = req.responseText || 'Unknown response text'; Raven.captureMessage(error, { extra: { @@ -36,7 +36,7 @@ const RavenConfig = { url: config.url, data: config.data, status: req.status, - response: req.responseText.substring(0, 100), + response: responseText.substring(0, 100), error, event, }, |