Add JavaScript sentry

This commit is contained in:
Sebastian Serth
2020-03-05 10:30:57 +01:00
parent f2c45b2488
commit 74d99df070
10 changed files with 93 additions and 105 deletions

View File

@@ -12,5 +12,6 @@ CodeOceanEditorAJAX = {
$.flash.danger({
text: message.length > 0 ? message : $('#flash').data('message-failure')
});
Sentry.captureException(response);
}
};

View File

@@ -565,6 +565,7 @@ configureEditors: function () {
icon: ['fa', 'fa-bug'],
text: $('#run').data('message-failure')
});
Sentry.captureException(output);
}
},
@@ -606,7 +607,7 @@ configureEditors: function () {
});
},
showWebsocketError: function() {
showWebsocketError: function(error) {
if (window.navigator.userAgent.indexOf('Edge') > -1 || window.navigator.userAgent.indexOf('Trident') > -1) {
// Mute errors in Microsoft Edge and Internet Explorer
return;
@@ -614,6 +615,7 @@ configureEditors: function () {
$.flash.danger({
text: $('#flash').data('message-failure')
});
Sentry.captureException(error);
},
showFileDialog: function(event) {

View File

@@ -108,10 +108,11 @@ $(document).on('turbolinks:load', function() {
}
}
var ajaxError = function() {
var ajaxError = function(error) {
$.flash.danger({
text: $('#flash').data('message-failure')
});
Sentry.captureException(error);
};
var buildCheckboxes = function() {