Skip to content

Commit

Permalink
Have Sentry report channel load failures in order to help us track do…
Browse files Browse the repository at this point in the history
…wn the cause of issue learningequality#900.
  • Loading branch information
kollivier committed Aug 21, 2018
1 parent 5ee7212 commit 18fa97c
Showing 1 changed file with 32 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,28 +72,56 @@ var ChannelListPage = BaseViews.BaseView.extend({
el: self.$("#channel_list"),
collection: channels
});
});
}).catch(function(e) {
if (Raven && Raven.catchException) {
Raven.catchException(e);
} else {
console.log("Error retrieving current channel list:");
console.log(e.statusText);
}
});
window.current_user.get_bookmarked_channels().then(function(channels){
self.starred_channel_list = new StarredChannelList({
container: self,
el: self.$("#starred_list"),
collection: channels
});
});
}).catch(function(e) {
if (Raven && Raven.catchException) {
Raven.catchException(e);
} else {
console.log("Error retrieving bookmarked channel list:");
console.log(e.statusText);
}
});
window.current_user.get_public_channels().then(function(channels){
self.public_channel_list = new PublicChannelList({
container: self,
el: self.$("#public_list"),
collection: channels
});
});
}).catch(function(e) {
if (Raven && Raven.catchException) {
Raven.catchException(e);
} else {
console.log("Error retrieving public channel list:");
console.log(e.statusText);
}
});
window.current_user.get_view_only_channels().then(function(channels){
self.viewonly_channel_list = new ViewOnlyChannelList({
container: self,
el: self.$("#viewonly_list"),
collection: channels
});
});
}).catch(function(e) {
if (Raven && Raven.catchException) {
Raven.catchException(e);
} else {
console.log("Error retrieving view-only channel list:");
console.log(e.statusText);
}
});
},
events: {
'click .new_channel_button' : 'new_channel',
Expand Down

0 comments on commit 18fa97c

Please sign in to comment.