From a6f4230895c3c141886b954206f2950356ea02dc Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 27 Apr 2021 23:15:38 -0700 Subject: [PATCH] settings: Remove broken default streams error handler. For unknown reasons, 6f7b973d3b30d96d350971c0f99390ee99c31742 introduced an invalid semi-duplicate call to ui_report.error that passed the wrong number of parameters. We should just call `ui_report.error`, which already had logic to handle the distinction between 40x and 50x errors. Fixes an issue reported in #18273. --- static/js/settings_streams.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/static/js/settings_streams.js b/static/js/settings_streams.js index 10f33e7a9f..71e17ead22 100644 --- a/static/js/settings_streams.js +++ b/static/js/settings_streams.js @@ -80,11 +80,7 @@ function make_stream_default(stream_id) { url: "/json/default_streams", data, error(xhr) { - if (xhr.status.toString().charAt(0) === "4") { - ui_report.error($t_html({defaultMessage: "Failed"}), xhr, default_stream_status); - } else { - ui_report.error($t_html({defaultMessage: "Failed"}), default_stream_status); - } + ui_report.error($t_html({defaultMessage: "Failed"}), xhr, default_stream_status); default_stream_status.show(); }, });