mirror of
https://github.com/zulip/zulip.git
synced 2025-11-22 15:31:20 +00:00
Be more judicious in our showing of errors
Don't show an error banner for any uncaught JS exception, as often the app will continue to work fine, and there's no way to dismiss it other than reloading the page. Also, don't show a transient "could not connect to humbug" error if the check-for-messages-in-narrow request fails. (imported from commit 2c634ba088b58c17fa5b2e3353b0589d40b8e357)
This commit is contained in:
@@ -127,7 +127,7 @@ exports.wrap_function = function blueslip_wrap_function(func) {
|
||||
message += ":" + ex.lineNumber;
|
||||
}
|
||||
}
|
||||
report_error(message, ex.stack, {show_ui_msg: true});
|
||||
report_error(message, ex.stack);
|
||||
throw ex;
|
||||
}
|
||||
};
|
||||
@@ -288,8 +288,7 @@ exports.error = function blueslip_error (msg, more_info) {
|
||||
|
||||
exports.fatal = function blueslip_fatal (msg, more_info) {
|
||||
if (! page_params.debug_mode) {
|
||||
report_error(msg, Error().stack, {show_ui_msg: true,
|
||||
more_info: more_info});
|
||||
report_error(msg, Error().stack, {more_info: more_info});
|
||||
}
|
||||
|
||||
throw new BlueslipError(msg, more_info);
|
||||
|
||||
@@ -729,7 +729,6 @@ function maybe_add_narrowed_messages(messages, msg_list) {
|
||||
},
|
||||
error: function (xhr) {
|
||||
// We might want to be more clever here
|
||||
$('#connection-error').show();
|
||||
setTimeout(function () {
|
||||
if (msg_list === current_msg_list) {
|
||||
// Don't actually try again if we unnarrowed
|
||||
|
||||
Reference in New Issue
Block a user